25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 19 ■ <strong>Spring</strong> Boot, Simplifying Everything<br />

Figure 19-2. http://localhost:8080/documents Exposes the RESTful Calls<br />

Deploying MyDocuments<br />

You saw how <strong>Spring</strong> Boot downloads the dependencies and how it will trigger the correct context depending on the<br />

annotated classes. But what happens if you want to give this application to a friend, and this friend does not have<br />

an Internet connection? Do you still need to add all of the dependencies? Fortunately, the spring-boot plug-in has<br />

inherited some of the other plug-in tasks defined in the build.gradle and will take care of the dependencies.<br />

Creating an Executable Jar<br />

Let’s create a stand-alone application, an executable jar. Go to the book’s companion source code folder, and enter the<br />

following command:<br />

gradle :ch19:build<br />

269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!