什么是「;标签::…”;spring引导gradle文件中的语法?
使用SpringBoot和Gradle时,依赖项闭包中有一些注释,如“tag::jetty[]”和“end::jetty[]”。考虑到它们的语法,我假设它们是由类似SpringBootGradle插件的东西解析的。这些是干什么用的?他们是否需要让弹簧靴致动器和嵌入式码头工作 下面的示例(请参见依赖项闭包):什么是「;标签::…”;spring引导gradle文件中的语法?,gradle,spring-boot,Gradle,Spring Boot,使用SpringBoot和Gradle时,依赖项闭包中有一些注释,如“tag::jetty[]”和“end::jetty[]”。考虑到它们的语法,我假设它们是由类似SpringBootGradle插件的东西解析的。这些是干什么用的?他们是否需要让弹簧靴致动器和嵌入式码头工作 下面的示例(请参见依赖项闭包): 如本手册底部所述: 注意:此处嵌入了许多开始/结束注释。这样就可以将构建文件的一些部分提取到本指南中,以便进行上述详细解释。在生产构建文件中不需要它们 所以不,你不需要标签。它们只是用于在代
如本手册底部所述: 注意:此处嵌入了许多开始/结束注释。这样就可以将构建文件的一些部分提取到本指南中,以便进行上述详细解释。在生产构建文件中不需要它们 所以不,你不需要标签。它们只是用于在代码更改时自动更新指南的位
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.10.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
}
dependencies {
// tag::jetty[]
compile("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty")
// end::jetty[]
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator")
// end::actuator[]
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}