|
|
@@ -82,15 +82,15 @@ In a project directory of your choosing, create the following subdirectory struc
|
|
82
|
82
|
<version>0.1.0</version>
|
|
83
|
83
|
|
|
84
|
84
|
<parent>
|
|
85
|
|
- <groupId>org.springframework.zero</groupId>
|
|
86
|
|
- <artifactId>spring-starter-parent</artifactId>
|
|
|
85
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
86
|
+ <artifactId>spring-boot-up-parent</artifactId>
|
|
87
|
87
|
<version>0.5.0.BUILD-SNAPSHOT</version>
|
|
88
|
88
|
</parent>
|
|
89
|
89
|
|
|
90
|
90
|
<dependencies>
|
|
91
|
91
|
<dependency>
|
|
92
|
|
- <groupId>org.springframework.zero</groupId>
|
|
93
|
|
- <artifactId>spring-starter-web</artifactId>
|
|
|
92
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
93
|
+ <artifactId>spring-boot-up-web</artifactId>
|
|
94
|
94
|
</dependency>
|
|
95
|
95
|
<dependency>
|
|
96
|
96
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
@@ -116,7 +116,7 @@ In a project directory of your choosing, create the following subdirectory struc
|
|
116
|
116
|
</project>
|
|
117
|
117
|
```
|
|
118
|
118
|
|
|
119
|
|
-TODO: mention that we're using Spring Bootstrap's [_starter POMs_](../gs-bootstrap-starter) here.
|
|
|
119
|
+TODO: mention that we're using Spring Boot's [_starter POMs_](../gs-bootstrap-starter) here.
|
|
120
|
120
|
|
|
121
|
121
|
Note to experienced Maven users who are unaccustomed to using an external parent project: you can take it out later, it's just there to reduce the amount of code you have to write to get started.
|
|
122
|
122
|
|
|
|
@@ -229,8 +229,8 @@ Although it is possible to package this service as a traditional [WAR][u-war] fi
|
|
229
|
229
|
```java
|
|
230
|
230
|
package hello;
|
|
231
|
231
|
|
|
232
|
|
-import org.springframework.autoconfigure.EnableAutoConfiguration;
|
|
233
|
|
-import org.springframework.bootstrap.SpringApplication;
|
|
|
232
|
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
|
233
|
+import org.springframework.boot.SpringApplication;
|
|
234
|
234
|
import org.springframework.context.annotation.ComponentScan;
|
|
235
|
235
|
|
|
236
|
236
|
@ComponentScan
|
|
|
@@ -264,8 +264,8 @@ Add the following configuration to your existing Maven POM:
|
|
264
|
264
|
<build>
|
|
265
|
265
|
<plugins>
|
|
266
|
266
|
<plugin>
|
|
267
|
|
- <groupId>org.springframework.zero</groupId>
|
|
268
|
|
- <artifactId>spring-package-maven-plugin</artifactId>
|
|
|
267
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
268
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
269
|
269
|
</plugin>
|
|
270
|
270
|
</plugins>
|
|
271
|
271
|
</build>
|
|
|
@@ -273,15 +273,20 @@ Add the following configuration to your existing Maven POM:
|
|
273
|
273
|
|
|
274
|
274
|
The `start-class` property tells Maven to create a `META-INF/MANIFEST.MF` file with a `Main-Class: hello.Application` entry. This entry enables you to run the jar with `java -jar`.
|
|
275
|
275
|
|
|
276
|
|
-The [Spring Package maven plugin][spring-package-maven-plugin] collects all the jars on the classpath and builds a single "über-jar", which makes it more convenient to execute and transport your service.
|
|
|
276
|
+The [Spring Boot maven plugin][spring-boot-maven-plugin] collects all the jars on the classpath and builds a single "über-jar", which makes it more convenient to execute and transport your service.
|
|
277
|
277
|
|
|
278
|
|
-Now run the following to produce a single executable JAR file containing all necessary dependency classes and resources:
|
|
|
278
|
+Now run the following command to produce a single executable JAR file containing all necessary dependency classes and resources:
|
|
279
|
279
|
|
|
280
|
280
|
```sh
|
|
281
|
281
|
$ mvn package
|
|
282
|
282
|
```
|
|
283
|
283
|
|
|
284
|
|
-[spring-package-maven-plugin]: https://github.com/SpringSource/spring-zero/tree/master/spring-package-maven-plugin
|
|
|
284
|
+To run the package, run this:
|
|
|
285
|
+```sh
|
|
|
286
|
+$ mvn spring-boot:run
|
|
|
287
|
+```
|
|
|
288
|
+
|
|
|
289
|
+[spring-boot-maven-plugin]: https://github.com/SpringSource/spring-boot/tree/master/spring-boot-maven-plugin
|
|
285
|
290
|
|
|
286
|
291
|
> **Note:** The procedure above will create a runnable JAR. You can also opt to [build a classic WAR file](/guides/gs/convert-jar-to-war/content) instead.
|
|
287
|
292
|
|