💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 13.3. Gradle ### 13.3. Gradle Gradle用户可以直接在它们的`dependencies`节点处导入”starters“。跟Maven不同的是,这里不用导入"super parent",也就不能共享配置。 ``` apply plugin: 'java' repositories { maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/milestone" } } dependencies { compile("org.springframework.boot:spring-boot-starter-web:1.4.1.BUILD-SNAPSHOT") } ``` 跟maven类似,spring boot也有gradle插件[spring-boot-gradle-plugin](../VIII.%20Build%20tool%20plugins/65.%20Spring%20Boot%20Gradle%20plugin.md),它能够提供任务用于创建可执行jar,或从源码(source)运行项目。它也提供[依赖管理](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#build-tool-plugins-gradle-dependency-management)的能力,该功能允许你省略Spring Boot管理的任何依赖的version版本号: ``` buildscript { repositories { maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/milestone" } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.BUILD-SNAPSHOT") } } apply plugin: 'java' apply plugin: 'spring-boot' repositories { maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/milestone" } } dependencies { compile("org.springframework.boot:spring-boot-starter-web") testCompile("org.springframework.boot:spring-boot-starter-test") } ```