父模块配置 > build.gradle
| buildscript { |
| |
| ext { |
| springBootVersion = '2.3.12.RELEASE' |
| springCloudVersion = 'Hoxton.SR12' |
| springCloudAlibabaVersion = '2.2.9.RELEASE' |
| } |
| |
| repositories { |
| maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} |
| mavenCentral() |
| } |
| |
| dependencies { |
| classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
| } |
| } |
| |
| |
| allprojects { |
| group 'com.dq.ggac' |
| version '1.0' |
| apply plugin: 'idea' |
| apply plugin: "java" |
| apply plugin: "org.springframework.boot" |
| apply plugin: "io.spring.dependency-management" |
| |
| sourceCompatibility = 11 |
| targetCompatibility = 11 |
| |
| tasks.withType(JavaCompile){ |
| options.encoding ="UTF-8" |
| } |
| |
| repositories { |
| maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} |
| mavenCentral() |
| } |
| |
| } |
| |
| |
| subprojects { |
| dependencyManagement{ |
| imports{ |
| mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}" |
| mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" |
| mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}" |
| } |
| } |
| |
| dependencies { |
| |
| compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.10' |
| annotationProcessor 'org.projectlombok:lombok:1.18.2' |
| |
| compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2' |
| compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2' |
| compile group: 'io.swagger', name: 'swagger-annotations', version: '1.5.22' |
| compile group: 'io.swagger', name: 'swagger-models', version: '1.5.22' |
| compile group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: '2.0.4' |
| compile group: 'org.springframework.boot', name: 'spring-boot-starter-validation' |
| } |
| } |
| |
子模块配置 client-service > build.gradle
| bootJar { |
| enabled = true |
| } |
| |
| dependencies { |
| compile project(':core') |
| compile('org.springframework.boot:spring-boot-starter-test') |
| implementation 'org.springframework.boot:spring-boot-starter-web' |
| implementation('org.springframework.boot:spring-boot-starter-data-jpa') |
| implementation('org.springframework.boot:spring-boot-starter-jdbc') |
| runtimeOnly('mysql:mysql-connector-java') |
| compile group: 'com.alibaba', name: 'fastjson', version: '1.2.58' |
| compile('org.springframework.boot:spring-boot-starter-data-redis') |
| annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
| compile 'org.apache.httpcomponents:httpclient:4.5.6' |
| } |
核心依赖模块配置 core > build.gradle
| jar { |
| enabled = true |
| } |
| |
| dependencies { |
| compile('org.springframework.boot:spring-boot-starter-test') |
| implementation 'org.springframework.boot:spring-boot-starter-web' |
| implementation('org.springframework.boot:spring-boot-starter-data-jpa') |
| implementation('org.springframework.boot:spring-boot-starter-jdbc') |
| runtimeOnly('mysql:mysql-connector-java') |
| compile group: 'com.alibaba', name: 'fastjson', version: '1.2.58' |
| compile('org.springframework.boot:spring-boot-starter-data-redis') |
| annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
| compile 'org.apache.httpcomponents:httpclient:4.5.6' |
| compile('com.vladmihalcea:hibernate-types-52:2.4.1') |
| } |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)