123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- // Gradle plugin
- plugins {
- id 'org.springframework.boot' version '2.7.18'
- id 'io.spring.dependency-management' version '1.0.9.RELEASE'
- id 'java'
- id 'war'
- }
- // apply plugin: 'org.springframework.boot'
- // apply plugin: 'io.spring.dependency-management'
- war {
- archiveBaseName = 'cus-wms-supervise2.0'
- }
- // 解决中文乱码
- tasks.withType(JavaCompile) {
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- options.encoding = "UTF-8"
- }
- repositories {
- // 本地仓库
- mavenLocal()
- // ali 代理的central仓
- maven {url 'https://maven.aliyun.com/repository/central'}
- // ali 代理的central仓和jcenter仓的聚合仓
- maven {url 'https://maven.aliyun.com/repository/public'}
- maven {url 'https://maven.aliyun.com/repository/google'}
- maven {url 'https://maven.aliyun.com/repository/gradle-plugin'}
- maven {url 'https://maven.aliyun.com/repository/spring'}
- maven {url 'https://maven.aliyun.com/repository/spring-plugin'}
- maven {url 'https://maven.aliyun.com/repository/grails-core'}
- // 远程中央仓库
- mavenCentral()
- maven {url 'https://repo1.maven.org/maven2/'}
- maven {url 'https://plugins.gradle.org/m2/'}
- maven {url 'https://repo.spring.io/libs-milestone/'}
- maven {url 'https://repo.spring.io/plugins-release/'}
- maven {url 'https://repo.grails.org/grails/core/'}
- maven {url 'https://repository.apache.org/content/groups/public/'}
- maven {url 'https://repository.jboss.org/nexus/content/repositories/releases/'}
- // 配置使用其它nexus 私服
- maven {
- // 非https需要增加对不安全协议的信任
- allowInsecureProtocol true
- url 'http://nexus.ds-bay.com/content/groups/public/'
- credentials {
- username 'admin'
- password 'admin123'
- }
- }
- //maven {url 'others url'}
- }
- ext {
- mybatis_spring_boot = '1.3.1'
- mybatis_typehandlers_jsr310 = '1.0.2'
- logback_ext_spring = '0.1.4'
- jackson = '2.9.8'
- google_guava = '23.3-jre'
- cage = '1.0'
- okhttp = '3.4.1'
- apache_commons_lang3 = '3.6'
- gson = '2.8.0'
- snakeyaml = '2.2'
- }
- dependencies {
- // Spring Boot
- testImplementation('org.springframework.boot:spring-boot-starter-test')
- implementation('org.springframework.boot:spring-boot-starter-tomcat')
- implementation('org.springframework.boot:spring-boot-starter-web')
- implementation('org.springframework.boot:spring-boot-starter-aop')
- implementation('org.springframework.boot:spring-boot-starter-jdbc')
- // Mybatis Spring Boot
- implementation("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}")
- // Mybatis支持使用LocalDateTime
- implementation("org.mybatis:mybatis-typehandlers-jsr310:${mybatis_typehandlers_jsr310}")
- // Spring Boot自带的2.x 版本的 mariadb 包,包里的AbstractConnectProtocol.java 里有session_track_schema参数,
- // 在连接mysql 5.6 版本数据库时,会报Unknown system variable 'session_track_schema'异常,需要使用低版本 mariadb 1.5.9
- // 连接mysql 5.7+ 无此问题
- // Mariadb jdbc
- //implementation('org.mariadb.jdbc:mariadb-java-client')
- // 生产库使用mysql 5.6版本, 需要使用低版本mariadb
- implementation("org.mariadb.jdbc:mariadb-java-client:1.5.9")
- // HikariCP
- implementation('com.zaxxer:HikariCP')
- // logback对spring的支持
- implementation("org.logback-extensions:logback-ext-spring:${logback_ext_spring}")
- // 数据序列化
- implementation("com.fasterxml.jackson.core:jackson-databind:${jackson}")
- implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}")
- implementation("com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}")
- // 工具类
- implementation("com.google.guava:guava:${google_guava}")
- implementation("org.apache.commons:commons-lang3:${apache_commons_lang3}")
- //gson
- implementation("com.google.code.gson:gson:${gson}")
- // 读取yml文件
- implementation("org.yaml:snakeyaml:${snakeyaml}")
- }
|