Usage: $ gradle bootRun ... Edit files in src/main/resources and see the changes live in a web app (e.g. static resources in /static). The old functionality of bootRun has been replaced (since it didn't add a lot of value and also didn't expose any JMV argument setters of anything). This new feature set is backed by any existing "run" task configuration. In addition autodetects a main class if there is one in the project sources, so no need for mainClassName = '...' in build.gradle. Applies the 'application' plugin (so no need to declare that either). Fixes gh-225
38 lines
818 B
Groovy
38 lines
818 B
Groovy
buildscript {
|
|
ext {
|
|
springBootVersion = '0.5.0.BUILD-SNAPSHOT'
|
|
}
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url "http://repo.springsource.org/libs-snapshot" }
|
|
}
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
}
|
|
}
|
|
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'spring-boot'
|
|
|
|
jar {
|
|
baseName = 'spring-boot-sample-simple'
|
|
version = '0.5.0'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "http://repo.springsource.org/libs-snapshot" }
|
|
}
|
|
|
|
dependencies {
|
|
compile("org.springframework.boot:spring-boot-starter:${springBootVersion}")
|
|
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '1.6'
|
|
}
|