当前位置: 首页 > news >正文

gradle微服务依赖模版

1、父工程依赖模版

注: ext里的内容需要配合设置云效仓库参数到环境变量及gradle使用-CSDN博客使用

plugins {  id 'org.springframework.boot' version '2.3.12.RELEASE'  // 引入dependency-management插件  id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}  group = 'com.fafa'  subprojects {  apply plugin: 'org.springframework.boot'  apply plugin: 'io.spring.dependency-management'  apply plugin: 'java'  sourceCompatibility = 11  targetCompatibility = 11  ext {  MAVEN_REPO_RELEASE_URL = System.getenv('MAVEN_REPO_RELEASE_URL')  MAVEN_REPO_SNAPSHOT_URL = System.getenv('MAVEN_REPO_SNAPSHOT_URL')  MAVEN_DEPLOY_USER = System.getenv('MAVEN_DEPLOY_USER')  MAVEN_DEPLOY_PASSWORD = System.getenv('MAVEN_DEPLOY_PASSWORD')  }  repositories {  maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }  maven {  url 'https://maven.aliyun.com/repository/public'  }  maven { url "https://repo.spring.io/milestone" }  maven { url "https://plugins.gradle.org/m2/" }  maven {  credentials {  username MAVEN_DEPLOY_USER  password MAVEN_DEPLOY_PASSWORD  }  url MAVEN_REPO_RELEASE_URL  }  maven {  credentials {  username MAVEN_DEPLOY_USER  password MAVEN_DEPLOY_PASSWORD  }  url MAVEN_REPO_SNAPSHOT_URL  }  mavenCentral()  }  configurations{  // implementation {  // exclude group: 'com.alibaba.nacos', module: 'nacos-client'  // }  }  dependencyManagement {  imports { mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:2.2.10-RC1" }  imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR12" }  }  dependencies {  //Spring Boot Web 启动器  implementation 'org.springframework.boot:spring-boot-starter-web'  compileOnly 'org.projectlombok:lombok'  runtimeOnly 'mysql:mysql-connector-java'  annotationProcessor 'org.projectlombok:lombok'  testImplementation 'org.springframework.boot:spring-boot-starter-test'  }  test {  useJUnitPlatform()  }  sourceSets {  main {  resources {  srcDirs = ['src/main/resources']  }  }  }  tasks.withType(JavaCompile) {  options.encoding = "UTF-8"  doLast {  copy {  from sourceSets.main.resources  into "$buildDir/resources/main"  }  }  }  
}

2、子工程依赖模版

group = 'com.fafa.order'  
version = '1.0'  
description = "order-service"  apply plugin: 'application'  dependencies {  //mybatis  implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.1'  
}

http://www.dtcms.com/a/289045.html

相关文章:

  • OpenTelemetry学习笔记(九):Elastic 对 OTLP 的原生支持
  • 【成品设计】基于STM32的宠物检测系统
  • 状态管理与团队协作 - SRE 的核心关切
  • Flink2.0学习笔记:Table API SQL
  • Ubuntu 24.04 设置静态 IP 的方法
  • XILINX JESD204B/C IP的AXI配置
  • leetCode——1492. n的第k个因子
  • ps2025下载与安装教程(附安装包) 2025最新版photoshop安装教程
  • 进阶向:基于Python的局域网文件传输工具
  • 初识软件测试
  • Redis 详解:从入门到进阶
  • Hiredis 构建 Redis 命令实战指南
  • 基于pi/4-QPSK扩频解扩和gardner环定时同步的通信系统matlab性能仿真
  • 绝对定位 vs 浮动:CSS布局核心差异解析
  • Spring 源码阅读(二) 核心概念解析 ApplicationContext、类型转化
  • 企业安全防护:堡垒机技术解析
  • 数据结构与算法汇总
  • spring-cloud使用
  • 再谈文件-ext2文件系统
  • NISP-PTE基础实操——XSS
  • PPT科研画图插件
  • 力扣-55.跳跃游戏
  • 【C语言】内存函数介绍(上)
  • axios二次封装-单个、特定的实例的拦截器、所有实例的拦截器。
  • 【机器学习深度学习】量化与选择小模型的区别:如何理解两者的优势与局限?
  • 嵌入式硬件篇---核心板制作
  • nginx定期清理日志
  • 【面向对象】C++类实现计数器:从理论到实践的编程之旅
  • RK3588 编译 Android 13 镜像方法
  • 基于有监督学习的主动攻击检测系统