代码拉取完成,页面将自动刷新
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.0'
}
ext {
springCloudVersion = '2022.0.0'
springCloudAlibabaVersion = '2022.0.0.0'
springBootVersion = '3.0.2'
slf4jVersion = '1.7.25'
logbackVersion = '1.2.3'
hutoolVersion = "5.8.16"
knife4jVersion = "4.1.0"
fastjsonVersion = "2.0.28"
swaggerAnnotationVersion = "2.2.8"
}
// 全局配置
allprojects {
group 'com.srlg.edu'
version '1.0'
// 指定jdk版本
sourceCompatibility = '17'
targetCompatibility = '17'
//业务编码字符集,注意这是指定源码解码的字符集[编译器
compileJava.options.encoding "UTF-8"
//测试编码字符集,注意这是指定源码解码的字符集[编译器]
compileTestJava.options.encoding "UTF-8"
//编译JAVA文件时采用UTF-8 :注意这是指定源码编码的字符集【源文件】
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
//编译JAVA文件时采用UTF-8 :注意这是指定文档编码的字符集【源文件】
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
}
}
// 子项目的通用配置
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
// 可以使用api编译
apply plugin: 'java-library'
jar.enabled = true
repositories {
mavenLocal()
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
// mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
// 定义依赖,后续子模块中就可以不用写版本号
dependencies {
dependency("cn.hutool:hutool-all:${hutoolVersion}")
dependency("com.github.xiaoymin:knife4j-openapi3-spring-boot-starter:${knife4jVersion}")
dependency("com.alibaba.fastjson2:fastjson2:${fastjsonVersion}")
dependency("io.swagger.core.v3:swagger-annotations:${swaggerAnnotationVersion}")
}
}
dependencies {
implementation 'com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config'
implementation 'com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery'
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation("cn.hutool:hutool-all")
implementation("com.alibaba.fastjson2:fastjson2")
implementation("io.swagger.core.v3:swagger-annotations")
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation("org.springframework.boot:spring-boot-starter-test")
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.projectlombok:lombok'
implementation "ch.qos.logback:logback-classic"
annotationProcessor 'org.projectlombok:lombok'
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。