22 lines
610 B
Markdown
22 lines
610 B
Markdown
### 59.1. 包含该插件
|
||
|
||
想要使用Spring Boot Gradle插件,你只需简单的包含一个`buildscript`依赖,并应用`spring-boot`插件:
|
||
```gradle
|
||
buildscript {
|
||
dependencies {
|
||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.0.BUILD-SNAPSHOT")
|
||
}
|
||
}
|
||
apply plugin: 'spring-boot'
|
||
```
|
||
如果想使用一个里程碑或快照版本,你可以添加相应的repositories引用:
|
||
```gradle
|
||
buildscript {
|
||
repositories {
|
||
maven.url "http://repo.spring.io/snapshot"
|
||
maven.url "http://repo.spring.io/milestone"
|
||
}
|
||
// ...
|
||
}
|
||
```
|