提交 384a9e64 编写于 作者: G Greg Turnquist

Use tags to simplify the guide

上级 246eb4f2
......@@ -2,7 +2,7 @@
tags: [spring-boot]
projects: [spring-boot]
---
:spring_boot_version: 0.5.0.M6
:spring_boot_version: 1.0.0.RC3
:spring-boot: https://github.com/spring-projects/spring-boot
:toc:
:icons: font
......@@ -154,30 +154,14 @@ Change your `build.gradle` to exclude Tomcat then add Jetty to the list of depen
[source,groovy]
----
compile("org.springframework.boot:spring-boot-starter-web:0.5.0.M6") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty:0.5.0.M6")
include::complete/build.gradle[tag=jetty]
----
If you are using Maven, the changes look like this:
[source,xml]
----
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
include::complete/pom.xml[tag=jetty]
----
This change isn't about comparing Tomcat vs. Jetty. Instead, it demonstrates how Spring Boot reacts to what is on your classpath.
......@@ -264,17 +248,14 @@ Add this to your build file's list of dependencies:
[source,groovy]
----
compile("org.springframework.boot:spring-boot-starter-actuator:0.5.0.M6")
include::complete/build.gradle[tag=actuator]
----
If you are using Maven, add this to your list of dependencies:
[source,xml]
----
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
include::complete/pom.xml[tag=actuator]
----
Then restart the app:
......
......@@ -24,11 +24,15 @@ repositories {
}
dependencies {
// tag::jetty[]
compile("org.springframework.boot:spring-boot-starter-web:1.0.0.RC3") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty:1.0.0.RC3")
// end::jetty[]
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator:1.0.0.RC3")
// end::actuator[]
testCompile("junit:junit")
}
......
......@@ -14,6 +14,7 @@
</parent>
<dependencies>
<!-- tag::jetty[] -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
......@@ -28,10 +29,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- end::jetty[] -->
<!-- tag::actuator[] -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- end::actuator[] -->
</dependencies>
<properties>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册