代码拉取完成,页面将自动刷新
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5' apply false
id 'io.spring.dependency-management' version '1.1.3'
}
group = 'com.jojava'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
// 所有项目(主项目+子项目)配置
allprojects {
// 指定需要的插件
// 指定语言
apply plugin: 'java'
// 配置项目信息(继承主项目)
group group
version version
// 配置仓库
repositories {
//阿里
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
//腾讯
//maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' }
//华为
//maven { url 'https://developer.huawei.com/repo/' }
mavenCentral()
gradlePluginPortal()
mavenLocal()
}
}
// 子项目配置
subprojects {
// 子项目插入组件
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
// 编译JDK版本
// sourceCompatibility = '21'
// 配置字符编码
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// 子项目引用依赖
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
tasks.named('test') {
useJUnitPlatform()
}
// 开启构建bootJar
tasks.bootJar {
enabled = true
}
// tasks.jar {
// enabled = true
// }
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。