-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (41 loc) · 1.73 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
buildscript { //gradle脚本自身需要使用的资源
ext {
springBootVersion = '2.0.0.RELEASE'
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } //阿里云
// mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
//项目需要的资源
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } //阿里云
// mavenCentral()
}
dependencies {
testCompile('org.springframework.boot:spring-boot-starter-test') //测试期编译需要的附加依赖
runtime('mysql:mysql-connector-java')
runtime('com.h2database:h2')
compile('org.springframework.boot:spring-boot-devtools') //热部署
compile('org.springframework.boot:spring-boot-starter-web') //编译范围依赖在所有的classpath中可用,同时它们也会被打包
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-data-redis')
compile('org.springframework.boot:spring-boot-starter-websocket')
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
compile('com.alibaba:druid:1.1.9')
compile('com.alibaba:fastjson:1.2.47')
//testRuntime 测试期编译需要的附加依赖 //运行和测试时需要,编译不需要
//runtime
}