|
|
|
|
40
|
include::initial/build.gradle[]
|
40
|
include::initial/build.gradle[]
|
41
|
----
|
41
|
----
|
42
|
|
42
|
|
|
|
43
|
+NOTE: There are several comments embedded in this build file. They are used to extract out fragments for more detailed explanation further down in this guide.
|
|
|
44
|
+
|
43
|
== Learn what you can do with Spring Boot
|
45
|
== Learn what you can do with Spring Boot
|
44
|
|
46
|
|
45
|
Spring Boot offers a fast way to build applications. It looks at your classpath and at beans you have configured, makes reasonable assumptions about what you're missing, and adds it. With Spring Boot you can focus more on business features and less on infrastructure.
|
47
|
Spring Boot offers a fast way to build applications. It looks at your classpath and at beans you have configured, makes reasonable assumptions about what you're missing, and adds it. With Spring Boot you can focus more on business features and less on infrastructure.
|
|
|
|
|
148
|
....
|
150
|
....
|
149
|
|
151
|
|
150
|
== Add production-grade services
|
152
|
== Add production-grade services
|
151
|
-If you are building a web site for your business, you probably need to add some management services. Spring Boot provides several out of the box with its https://github.com/spring-projects/spring-boot/blob/master/spring-boot-actuator/README.md[actuator module], such as health, audits, beans, and more.
|
|
|
|
|
153
|
+If you are building a web site for your business, you probably need to add some management services. Spring Boot provides several out of the box with its http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#production-ready[actuator module], such as health, audits, beans, and more.
|
152
|
|
154
|
|
153
|
Add this to your build file's list of dependencies:
|
155
|
Add this to your build file's list of dependencies:
|
154
|
|
156
|
|
|
|
|
|
215
|
|
217
|
|
216
|
Whew! You probably don't want that until you are ready to turn on proper security settings, if at all.
|
218
|
Whew! You probably don't want that until you are ready to turn on proper security settings, if at all.
|
217
|
|
219
|
|
218
|
-For more details about each of these REST points and how you can tune their settings with an `application.properties` file, check out the {spring-boot}[Spring Boot] project.
|
|
|
|
|
220
|
+For more details about each of these REST points and how you can tune their settings with an `application.properties` file, you can read detailed http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#production-ready-endpoints[docs about the endpoints].
|
219
|
|
221
|
|
220
|
== View Spring Boot's starters
|
222
|
== View Spring Boot's starters
|
221
|
-You have seen some of Spring Boot's **starters**. You can see them all https://github.com/spring-projects/spring-boot/tree/master/spring-boot-starters[here].
|
|
|
|
|
223
|
+You have seen some of http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#using-boot-starter-poms[Spring Boot's "starters"]. You can see them all https://github.com/spring-projects/spring-boot/tree/master/spring-boot-starters[here in source code].
|
222
|
|
224
|
|
223
|
== JAR support and Groovy support
|
225
|
== JAR support and Groovy support
|
224
|
The last example showed how Spring Boot makes it easy to wire beans you may not be aware that you need. And it showed how to turn on convenient management services.
|
226
|
The last example showed how Spring Boot makes it easy to wire beans you may not be aware that you need. And it showed how to turn on convenient management services.
|
|
|
|
|
244
|
|
246
|
|
245
|
NOTE: It doesn't matter where the file is. You can even fit an application that small inside a https://twitter.com/rob_winch/status/364871658483351552[single tweet]!
|
247
|
NOTE: It doesn't matter where the file is. You can even fit an application that small inside a https://twitter.com/rob_winch/status/364871658483351552[single tweet]!
|
246
|
|
248
|
|
247
|
-Next, https://github.com/spring-projects/spring-boot#installing-the-cli[install Spring Boot's CLI].
|
|
|
|
|
249
|
+Next, http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#getting-started-installing-the-cli[install Spring Boot's CLI].
|
248
|
|
250
|
|
249
|
Run it as follows:
|
251
|
Run it as follows:
|
250
|
|
252
|
|
|
|
|
|
260
|
Hello World!
|
262
|
Hello World!
|
261
|
----
|
263
|
----
|
262
|
|
264
|
|
263
|
-Spring Boot does this by dynamically adding key annotations to your code and leveraging http://groovy.codehaus.org/Grape[Groovy Grapes] to pull down needed libraries to make the app run.
|
|
|
|
|
265
|
+Spring Boot does this by dynamically adding key annotations to your code and leveraging http://groovy.codehaus.org/Grape[Groovy Grape] to pull down needed libraries to make the app run.
|
264
|
|
266
|
|
265
|
== Summary
|
267
|
== Summary
|
266
|
Congratulations! You built a simple web application with Spring Boot and learned how it can ramp up your development pace. You also turned on some handy production services.
|
268
|
Congratulations! You built a simple web application with Spring Boot and learned how it can ramp up your development pace. You also turned on some handy production services.
|
267
|
-This is only a small sampling of what Spring Boot can do. Checkout http://projects.spring.io/spring-boot/docs/README.html[Spring Boot's README]
|
|
|
|
|
269
|
+This is only a small sampling of what Spring Boot can do. Checkout http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle[Spring Boot's online docs]
|
268
|
if you want to dig deeper.
|
270
|
if you want to dig deeper.
|