一、build.gradle配置详情
Springboot集成新版本Gradle 7.0配置详细信息:
//gradle在其请求库中显示头部buildscript { repositories } maven { URL ' https://maven.a liyun.com/repository/public ' }/装载其他Maven仓库Maven的ependencies { class path (org.spring framework.boot : spring-boot-grad le-plugin :2.1.1 ) plugins { id ' Java ' id ' war ' } */apply plugin 3360 ' Java ' apply plugin 3360 ' idea '//spring boot框架apply plugin 3360 使用springboot自动依赖管理应用插件: ' io.spring.dependency -的版本信息group ' org.sugon ' version ' 1.0-snapshot '//用于运行项目的资源仓库repositories { maven { URL } https://maven.a liyun.com/re posion项目所需的从属关系//spring-correcore implementation ' org.spring framework :添加spring-core '//spring-boot-aaar的implementation ' org.spring framework 可以/不依赖添加spring-boot-starter-Tomcat implementation ' org.spring framework.boot : spring-boot-starter-Tomcat 安全必须根据自己的需要消除实施(org.spring framework.boot : spring-boot-starter-weeer ) { exclude groude } 模组: ' spring-security-config '//添加依赖于mybatis的implementation ' org.my batis.spring.boot : my batis-spring添加mysql的依赖关系implementation ' MySQL : MySQL 默认情况下,在编译产品时依赖于testimplementation ' org.spring framework.boot 3360 spring-boot-starter-test ' /附加junit测试依赖于版本: ' 4.11 '//Jupiter测试的testimplementation ' org.JUnit.Jupiter 3360 JUnit-Jupiter-API :5.6 '//依赖于要添加的jupiter测试的testruntimeonly ' org.JUnit.Jupiter : JUnit-Jupiter-engine '//如何消除第二个依赖关系/configuration s { comppon }
PS:grad le的新版本交换了几个关键字:
部署Gradle依赖关系
Gradle官网api