소스 검색

Edit guide to properly use spring-boot:run

Greg Turnquist 13 년 전
부모
커밋
1aa37a781f
2개의 변경된 파일4개의 추가작업 그리고 9개의 파일을 삭제
  1. 1
    1
      README.ftl.md
  2. 3
    8
      README.md

+ 1
- 1
README.ftl.md 파일 보기

@@ -120,7 +120,7 @@ The [`@EnableAutoConfiguration`][] annotation switches on reasonable default beh
120 120
 
121 121
 <@build_an_executable_jar/>
122 122
 
123
-<@run_the_application module="service"/>
123
+<@run_the_application_with_maven module="service"/>
124 124
 
125 125
 Logging output is displayed. The service should be up and running within a few seconds.
126 126
 

+ 3
- 8
README.md 파일 보기

@@ -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