代码拉取完成,页面将自动刷新
buildscript {
ext {
springBootVersion = '1.2.1.RELEASE'
}
repositories {
maven {
name = 'aliyun-nexus'
url = 'http://maven.aliyun.com/nexus/content/groups/public/'
}
jcenter()
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE")
classpath("org.springframework:springloaded:1.2.6.RELEASE")
}
}
configure(allprojects) { project ->
group = "spring-groovy-example"
version = '1.0'
ext {
junitVersion = "4.12"
gradleScriptDir = "${rootProject.projectDir}/gradle"
}
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'groovy'
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
compileTestJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
task createGroovyProject << {
sourceSets*.groovy.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
task createSpringBootProject(dependsOn: createGroovyProject) << {
def bootDirs = ['resources/static', 'resources/templates']
bootDirs.each { x ->
file(project.name + '/src/main/' + x).mkdirs()
file(project.name + '/src/test/' + x).mkdirs()
}
}
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]
// re-use repositories from buildscript
rootProject.buildscript.repositories.each { repositories.add(it) }
dependencies {
compile("org.codehaus.groovy:groovy")
testCompile("junit:junit:${junitVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
}
project("spring-boot-samples-simple") {
description = "简单的SpringBoot例子"
}
project("spring-boot-samples-data-jpa") {
description = "SpringBoot+SpringDataJpa+Mysql例子"
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("mysql:mysql-connector-java")
}
}
project('spring-boot-samples-shiro') {
description = "SpringBoot+SpringDataJpa+Mysql+Shiro例子"
ext {
shiroVersion = "1.2.3"
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
compile("org.apache.shiro:shiro-core:${shiroVersion}")
compile("org.apache.shiro:shiro-web:${shiroVersion}")
compile("org.apache.shiro:shiro-spring:${shiroVersion}")
}
}
project('spring-boot-samples-jsp') {
description = "SpringBoot使用jsp作为视图。"
//重要!在SpringBoot环境下,要用JSP必须打包成WAR。
apply plugin: 'war'
dependencies {
compile("javax.servlet:jstl")
providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper")
}
}
project('spring-boot-samples-mail') {
ext {
springBootVersion = '1.2.1.RELEASE'
}
description = "使用SpringBoot进行邮件发送,并且使用velocity作为邮件内容模板。"
dependencies {
compile("org.springframework.boot:spring-boot-starter-mail:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-velocity:${springBootVersion}")
}
}
project('spring-boot-samples-schedule') {
description = "使用SpringBoot执行任务调度。"
}
configure(subprojects.findAll { it.name.startsWith('spring-boot') }) {
configurations {
providedRuntime
}
apply plugin: 'spring-boot'
dependencies {
providedRuntime("org.springframework.boot:spring-boot-loader")
compile("com.google.guava:guava:18.0")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
compile("org.springframework.boot:spring-boot-starter-web")
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。