Przeglądaj źródła

Use tags to simplify the guide

Greg Turnquist 10 lat temu
rodzic
commit
384a9e64b5
3 zmienionych plików z 13 dodań i 24 usunięć
  1. 5
    24
      README.adoc
  2. 4
    0
      complete/build.gradle
  3. 4
    0
      complete/pom.xml

+ 5
- 24
README.adoc Wyświetl plik

2
 tags: [spring-boot]
2
 tags: [spring-boot]
3
 projects: [spring-boot]
3
 projects: [spring-boot]
4
 ---
4
 ---
5
-:spring_boot_version: 0.5.0.M6
5
+:spring_boot_version: 1.0.0.RC3
6
 :spring-boot: https://github.com/spring-projects/spring-boot
6
 :spring-boot: https://github.com/spring-projects/spring-boot
7
 :toc:
7
 :toc:
8
 :icons: font
8
 :icons: font
154
 
154
 
155
 [source,groovy]
155
 [source,groovy]
156
 ----
156
 ----
157
-    compile("org.springframework.boot:spring-boot-starter-web:0.5.0.M6") {
158
-        exclude module: "spring-boot-starter-tomcat"
159
-    }
160
-    compile("org.springframework.boot:spring-boot-starter-jetty:0.5.0.M6")
157
+include::complete/build.gradle[tag=jetty]
161
 ----
158
 ----
162
 
159
 
163
 If you are using Maven, the changes look like this:
160
 If you are using Maven, the changes look like this:
164
 
161
 
165
 [source,xml]
162
 [source,xml]
166
 ----
163
 ----
167
-        <dependency>
168
-            <groupId>org.springframework.boot</groupId>
169
-            <artifactId>spring-boot-starter-web</artifactId>
170
-            <exclusions>
171
-                <exclusion>
172
-                    <groupId>org.springframework.boot</groupId>
173
-                    <artifactId>spring-boot-starter-tomcat</artifactId>
174
-                </exclusion>
175
-            </exclusions>
176
-        </dependency>
177
-        <dependency>
178
-            <groupId>org.springframework.boot</groupId>
179
-            <artifactId>spring-boot-starter-jetty</artifactId>
180
-        </dependency>
164
+include::complete/pom.xml[tag=jetty]
181
 ----
165
 ----
182
 
166
 
183
 This change isn't about comparing Tomcat vs. Jetty. Instead, it demonstrates how Spring Boot reacts to what is on your classpath.
167
 This change isn't about comparing Tomcat vs. Jetty. Instead, it demonstrates how Spring Boot reacts to what is on your classpath.
264
 
248
 
265
 [source,groovy]
249
 [source,groovy]
266
 ----
250
 ----
267
-    compile("org.springframework.boot:spring-boot-starter-actuator:0.5.0.M6")
251
+include::complete/build.gradle[tag=actuator]
268
 ----
252
 ----
269
 
253
 
270
 If you are using Maven, add this to your list of dependencies:
254
 If you are using Maven, add this to your list of dependencies:
271
 
255
 
272
 [source,xml]
256
 [source,xml]
273
 ----
257
 ----
274
-        <dependency>
275
-            <groupId>org.springframework.boot</groupId>
276
-            <artifactId>spring-boot-starter-actuator</artifactId>
277
-        </dependency>
258
+include::complete/pom.xml[tag=actuator]
278
 ----
259
 ----
279
 
260
 
280
 Then restart the app:
261
 Then restart the app:

+ 4
- 0
complete/build.gradle Wyświetl plik

24
 }
24
 }
25
 
25
 
26
 dependencies {
26
 dependencies {
27
+    // tag::jetty[]
27
     compile("org.springframework.boot:spring-boot-starter-web:1.0.0.RC3") {
28
     compile("org.springframework.boot:spring-boot-starter-web:1.0.0.RC3") {
28
         exclude module: "spring-boot-starter-tomcat"
29
         exclude module: "spring-boot-starter-tomcat"
29
     }
30
     }
30
     compile("org.springframework.boot:spring-boot-starter-jetty:1.0.0.RC3")
31
     compile("org.springframework.boot:spring-boot-starter-jetty:1.0.0.RC3")
32
+    // end::jetty[]
33
+    // tag::actuator[]
31
     compile("org.springframework.boot:spring-boot-starter-actuator:1.0.0.RC3")
34
     compile("org.springframework.boot:spring-boot-starter-actuator:1.0.0.RC3")
35
+    // end::actuator[]
32
     testCompile("junit:junit")
36
     testCompile("junit:junit")
33
 }
37
 }
34
 
38
 

+ 4
- 0
complete/pom.xml Wyświetl plik

14
     </parent>
14
     </parent>
15
 
15
 
16
     <dependencies>
16
     <dependencies>
17
+	    <!-- tag::jetty[] -->
17
         <dependency>
18
         <dependency>
18
             <groupId>org.springframework.boot</groupId>
19
             <groupId>org.springframework.boot</groupId>
19
             <artifactId>spring-boot-starter-web</artifactId>
20
             <artifactId>spring-boot-starter-web</artifactId>
28
             <groupId>org.springframework.boot</groupId>
29
             <groupId>org.springframework.boot</groupId>
29
             <artifactId>spring-boot-starter-jetty</artifactId>
30
             <artifactId>spring-boot-starter-jetty</artifactId>
30
         </dependency>
31
         </dependency>
32
+        <!-- end::jetty[] -->
33
+        <!-- tag::actuator[] -->
31
         <dependency>
34
         <dependency>
32
             <groupId>org.springframework.boot</groupId>
35
             <groupId>org.springframework.boot</groupId>
33
             <artifactId>spring-boot-starter-actuator</artifactId>
36
             <artifactId>spring-boot-starter-actuator</artifactId>
34
         </dependency>
37
         </dependency>
38
+        <!-- end::actuator[] -->
35
     </dependencies>
39
     </dependencies>
36
 
40
 
37
     <properties>
41
     <properties>