|
|
@@ -1,5 +1,3 @@
|
|
1
|
|
-<!-- See expanded [macro:...] values at https://github.com/springframework-meta/springframework.org/tree/master/doc/gs-macros.md -->
|
|
2
|
|
-
|
|
3
|
1
|
# Getting Started: Building a RESTful Web Service
|
|
4
|
2
|
|
|
5
|
3
|
What you'll build
|
|
|
@@ -26,22 +24,22 @@ What you'll need
|
|
26
|
24
|
----------------
|
|
27
|
25
|
|
|
28
|
26
|
- About 15 minutes
|
|
29
|
|
- - [macro:prereq-editor-jdk-buildtools]
|
|
|
27
|
+ - {!snippet:prereq-editor-jdk-buildtools}
|
|
30
|
28
|
|
|
31
|
|
-## [macro:how-to-complete-this-guide]
|
|
|
29
|
+## {!snippet:how-to-complete-this-guide}
|
|
32
|
30
|
|
|
33
|
31
|
|
|
34
|
32
|
<a name="scratch"></a>
|
|
35
|
33
|
Set up the project
|
|
36
|
34
|
------------------
|
|
37
|
35
|
|
|
38
|
|
-[macro:build-system-intro]
|
|
|
36
|
+{!snippet:build-system-intro}
|
|
39
|
37
|
|
|
40
|
|
-[macro:create-directory-structure-hello]
|
|
|
38
|
+{!snippet:create-directory-structure-hello}
|
|
41
|
39
|
|
|
42
|
40
|
### Create a Maven POM
|
|
43
|
41
|
|
|
44
|
|
-[macro:maven-project-setup-options]
|
|
|
42
|
+{!snippet:maven-project-setup-options}
|
|
45
|
43
|
|
|
46
|
44
|
`pom.xml`
|
|
47
|
45
|
```xml
|
|
|
@@ -89,7 +87,7 @@ Set up the project
|
|
89
|
87
|
</project>
|
|
90
|
88
|
```
|
|
91
|
89
|
|
|
92
|
|
-[macro:bootstrap-starter-pom-disclaimer]
|
|
|
90
|
+{!snippet:bootstrap-starter-pom-disclaimer}
|
|
93
|
91
|
|
|
94
|
92
|
|
|
95
|
93
|
<a name="initial"></a>
|
|
|
@@ -218,7 +216,7 @@ The `@ComponentScan` annotation tells Spring to search recursively through the `
|
|
218
|
216
|
|
|
219
|
217
|
The [`@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 [`DispatcherServlet`][] is configured and registered for you — no `web.xml` necessary! Auto-configuration is a powerful, flexible mechanism. See the [API documentation][`@EnableAutoConfiguration`] for further details.
|
|
220
|
218
|
|
|
221
|
|
-### [macro:build-an-executable-jar]
|
|
|
219
|
+### {!snippet:build-an-executable-jar}
|
|
222
|
220
|
|
|
223
|
221
|
|
|
224
|
222
|
Run the service
|