12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // 部署为外部服务器时, 配置为war包
- apply plugin: 'war'
- war {
- archiveBaseName = 'analog-api'
- }
- // tag::dependencies[]
- dependencies {
- compileOnly "org.projectlombok:lombok:${lombok}"
- annotationProcessor "org.projectlombok:lombok:${lombok}"
- testImplementation('org.springframework.boot:spring-boot-starter-test') {
- exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
- }
- implementation "javax.annotation:javax.annotation-api:${javax_annotation_api}"
- // 内置Tomcat部署, 同时不需要编译, 使用 runtimeOnly
- //runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
- // 内置Tomcat部署, 同时需要编译, 使用 implementation
- implementation 'org.springframework.boot:spring-boot-starter-tomcat'
- // 外部Tomcat部署, 同时需要编译, 使用 compileOnly
- //compileOnly 'org.springframework.boot:spring-boot-starter-tomcat'
- //处理Properties 配置文件
- //Gradle 4.5 and earlier
- //compileOnly 'org.springframework.boot:spring-boot-configuration-processor'
- //Gradle 4.6 and later
- annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
- implementation 'org.springframework.boot:spring-boot-starter-web'
- implementation 'org.springframework.boot:spring-boot-starter-aop'
- // logback对spring的支持
- implementation "org.logback-extensions:logback-ext-spring:${logback_ext_spring}"
- // 数据序列化
- // 为保证引入 jackson包版本一致性,不使用到其它低版本包, 引入如下三个依赖
- implementation "com.fasterxml.jackson.core:jackson-databind:${jackson}"
- implementation "com.fasterxml.jackson.core:jackson-core:${jackson}"
- implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson}"
- // jackson 支持格式化LocalDateTime
- implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}"
- implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson}"
- implementation "com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}"
- // jackson 支持格式化XML
- implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson}"
- // 工具类
- implementation "com.google.guava:guava:${google_guava}"
- // Java工具包类库,各种Util工具类
- implementation "cn.hutool:hutool-all:${hutool}"
- // (推荐)Forest,Java HTTP 客户端框架
- implementation "com.dtflys.forest:spring-boot-starter-forest:${forest}"
- // alibaba 出品 excel 工具类, 需要 lombok 支持
- implementation "com.alibaba:easyexcel:${easyexcel}"
- }
- // end::dependencies[]
|