SpringBoot, Gradle, Groovy
Create build.gradle
:
buildscript { repositories { mavenCentral() maven { url 'http://repo.spring.io/libs-release' } } dependencies { classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC1' } } apply plugin: 'idea' apply plugin: 'groovy' apply plugin: 'spring-boot' version = '1.0' repositories { mavenCentral() maven { url "http://repo.spring.io/libs-release" } } dependencies { compile 'org.codehaus.groovy:groovy-all:2.2.1' compile 'org.springframework.boot:spring-boot-starter-batch:1.0.0.RC1' } task wrapper(type: Wrapper) { gradleVersion = '1.10' }
Add some bootstrap for SpringBoot src/main/groovy/Application.groovy
:
import org.springframework.boot.SpringApplication import org.springframework.context.annotation.Configuration import org.springframework.boot.autoconfigure.EnableAutoConfiguration @Configuration @EnableAutoConfiguration class Application { public static void main(String[] args) { SpringApplication.run([Application].toArray(), args) } }
Start and run with gradle bootRun