5
Spring Boot and Gradleを使用している場合、依存関係のクロージャに「tag :: jetty []」や「end :: jetty []」のようなコメントがいくつかあります。それらの構文を考えると、私は彼らがspring boot gradle pluginのようなものによって解析されると仮定します。これらは何をするのですか?彼らはスプリングブートアクチュエータと埋め込み桟橋を動作させる必要がありますか?スプリングブートグラデルファイルの "tag :: ..."構文は何ですか?
以下docsからのサンプル(依存関係の閉鎖を参照してください):
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'
}