|
|
|
|
|
|
39
|
|
39
|
|
|
40
|
== What you'll need
|
40
|
== What you'll need
|
|
41
|
|
41
|
|
|
42
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//prereq_editor_jdk_buildtools.adoc[]
|
|
|
|
|
|
42
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/prereq_editor_jdk_buildtools.adoc[]
|
|
43
|
|
43
|
|
|
44
|
|
44
|
|
|
45
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//how_to_complete_this_guide.adoc[]
|
|
|
|
|
|
45
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/how_to_complete_this_guide.adoc[]
|
|
46
|
|
46
|
|
|
47
|
|
47
|
|
|
48
|
[[scratch]]
|
48
|
[[scratch]]
|
|
49
|
== Set up the project
|
49
|
== Set up the project
|
|
50
|
|
50
|
|
|
51
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//build_system_intro.adoc[]
|
|
|
|
|
|
51
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/build_system_intro.adoc[]
|
|
52
|
|
52
|
|
|
53
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//create_directory_structure_hello.adoc[]
|
|
|
|
|
|
53
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/create_directory_structure_hello.adoc[]
|
|
54
|
|
54
|
|
|
55
|
|
55
|
|
|
56
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//create_both_builds.adoc[]
|
|
|
|
|
|
56
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/create_both_builds.adoc[]
|
|
57
|
`build.gradle`
|
57
|
`build.gradle`
|
|
58
|
// AsciiDoc source formatting doesn't support groovy, so using java instead
|
58
|
// AsciiDoc source formatting doesn't support groovy, so using java instead
|
|
59
|
[source,java]
|
59
|
[source,java]
|
|
|
|
|
|
|
61
|
include::initial/build.gradle[]
|
61
|
include::initial/build.gradle[]
|
|
62
|
----
|
62
|
----
|
|
63
|
|
63
|
|
|
64
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//bootstrap_starter_pom_disclaimer.adoc[]
|
|
|
|
|
|
64
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/bootstrap_starter_pom_disclaimer.adoc[]
|
|
65
|
|
65
|
|
|
66
|
|
66
|
|
|
67
|
[[initial]]
|
67
|
[[initial]]
|
|
|
|
|
|
|
140
|
|
140
|
|
|
141
|
The http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html[`@EnableAutoConfiguration`] annotation switches on reasonable default behaviors based on the content of your classpath. For example, because the application depends on the embeddable version of Tomcat (tomcat-embed-core.jar), a Tomcat server is set up and configured with reasonable defaults on your behalf. And because the application also depends on Spring MVC (spring-webmvc.jar), a Spring MVC http://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/web/servlet/DispatcherServlet.html[`DispatcherServlet`] is configured and registered for you — no `web.xml` necessary! Auto-configuration is a powerful, flexible mechanism. See the http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html[API documentation] for further details.
|
141
|
The http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html[`@EnableAutoConfiguration`] annotation switches on reasonable default behaviors based on the content of your classpath. For example, because the application depends on the embeddable version of Tomcat (tomcat-embed-core.jar), a Tomcat server is set up and configured with reasonable defaults on your behalf. And because the application also depends on Spring MVC (spring-webmvc.jar), a Spring MVC http://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/web/servlet/DispatcherServlet.html[`DispatcherServlet`] is configured and registered for you — no `web.xml` necessary! Auto-configuration is a powerful, flexible mechanism. See the http://docs.spring.io/spring-boot/docs/{spring_boot_version}/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html[API documentation] for further details.
|
|
142
|
|
142
|
|
|
143
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//build_an_executable_jar_subhead.adoc[]
|
|
|
|
|
|
143
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/build_an_executable_jar_subhead.adoc[]
|
|
144
|
|
144
|
|
|
145
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//build_an_executable_jar_with_both.adoc[]
|
|
|
|
|
|
145
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/build_an_executable_jar_with_both.adoc[]
|
|
146
|
|
146
|
|
|
147
|
:module: service
|
147
|
:module: service
|
|
148
|
-include::https://raw.github.com/spring-guides/getting-started-macros/master//run_the_application_with_both.adoc[]
|
|
|
|
|
|
148
|
+include::https://raw.github.com/spring-guides/getting-started-macros/master/run_the_application_with_both.adoc[]
|
|
149
|
|
149
|
|
|
150
|
Logging output is displayed. The service should be up and running within a few seconds.
|
150
|
Logging output is displayed. The service should be up and running within a few seconds.
|
|
151
|
|
151
|
|