|
|
@@ -271,7 +271,7 @@ Add the following configuration to your existing Maven POM:
|
|
271
|
271
|
</build>
|
|
272
|
272
|
```
|
|
273
|
273
|
|
|
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`.
|
|
|
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 it with `mvn spring-boot:run` (or simply run the jar itself with `java -jar`).
|
|
275
|
275
|
|
|
276
|
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
|
|
|
|
@@ -281,21 +281,16 @@ Now run the following command to produce a single executable JAR file containing
|
|
281
|
281
|
$ mvn package
|
|
282
|
282
|
```
|
|
283
|
283
|
|
|
284
|
|
-To run the package, run this:
|
|
285
|
|
-```sh
|
|
286
|
|
-$ mvn spring-boot:run
|
|
287
|
|
-```
|
|
288
|
|
-
|
|
289
|
284
|
[spring-boot-maven-plugin]: https://github.com/SpringSource/spring-boot/tree/master/spring-boot-maven-plugin
|
|
290
|
285
|
|
|
291
|
286
|
> **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.
|
|
292
|
287
|
|
|
293
|
288
|
Run the service
|
|
294
|
289
|
-------------------
|
|
295
|
|
-Run your service with `java -jar` at the command line:
|
|
|
290
|
+Run your service using the spring-boot plugin at the command line:
|
|
296
|
291
|
|
|
297
|
292
|
```sh
|
|
298
|
|
-$ java -jar target/gs-rest-service-0.1.0.jar
|
|
|
293
|
+$ mvn spring-boot:run
|
|
299
|
294
|
```
|
|
300
|
295
|
|
|
301
|
296
|
|