代码拉取完成,页面将自动刷新
// 声明gradle脚本自身需要使用的资源
buildscript {
repositories {
mavenLocal()
maven {
url "https://maven.aliyun.com/nexus/content/groups/public/"
}
mavenCentral()
}
dependencies {
//spring-boot插件
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.6.2"
classpath "io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE"
}
}
allprojects {
group = 'com.example'
version = '0.0.1-SNAPSHOT'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
sourceCompatibility = '1.8'
// 仓库:gradle会根据从上到下的顺序依次去仓库中寻找依赖
repositories {
// 优先从本地仓库获取
mavenLocal()
//从阿里云或者公司仓库获取
maven {
url 'https://maven.aliyun.com/nexus/content/groups/public/' // 配置阿里云仓库地址或者公司仓库地址
}
maven {
url 'https://maven.aliyun.com/repository/public/'
}
maven {
url 'https://maven.aliyun.com/repository/apache-snapshots/'
}
//从中央仓库获取
mavenCentral()
}
dependencies {
// spring
implementation 'org.springframework.boot:spring-boot-starter'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
implementation 'org.springframework.boot:spring-boot-starter-web:2.6.2'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Aspect
// https://mvnrepository.com/artifact/org.aspectj/aspectjweaver
implementation 'org.aspectj:aspectjweaver:1.9.7'
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// mybatis
// https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.0'
compile "org.mybatis:mybatis:3.5.6"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.8.1'
//gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
// fastjson
// https://mvnrepository.com/artifact/com.alibaba/fastjson
implementation 'com.alibaba:fastjson:1.2.78'
// jdbc
compile "org.springframework.boot:spring-boot-starter-jdbc"
// 数据库驱动
compile 'mysql:mysql-connector-java:5.1.49'
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。