-
Notifications
You must be signed in to change notification settings - Fork 330
/
build.gradle
64 lines (61 loc) · 2.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
buildscript {
ext {
springBootVersion = '1.4.4.RELEASE'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
// classpath 'org.springframework:springloaded:1.2.6.RELEASE' // Modern IDEs (Eclipse, IDEA, etc.) all support hot swapping of bytecode, so if you make a change that doesn’t affect class or method signatures it should reload cleanly with no side effects. Spring Loaded goes a little further in that it can reload class definitions with changes in the method signatures. With some customization it can force an ApplicationContext to refresh itself (but there is no general mechanism to ensure that would be safe for a running application anyway, so it would only ever be a development time trick probably).
}
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.timeyang.onlinestore'
version = '1.0.0'
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8 // 必须在apply java插件之后
targetCompatibility = 1.8
repositories {
maven { url 'http://mvnrepo.tae.taobao.com/content/groups/public/' }
mavenCentral()
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR5'
}
}
dependencies {
testCompile 'org.springframework.boot:spring-boot-starter-test'
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.cloud:spring-cloud-starter-eureka"
compile "org.springframework.boot:spring-boot-starter-actuator"
}
bootRun {
addResources = true
}
idea {
module {
downloadSources = true
downloadJavadoc = false
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/") // By default, IntelliJ IDEA will compile classes into a different location than Gradle, causing Spring Loaded monitoring to fail. 注意,我们这里并没有使用 Spring Loaded
}
}
springBoot {
executable = true
}
}
idea {
project {
jdkName = '1.8'
languageLevel = '1.8'
}
}