Browse Source

修改Swagger依赖问题

csk 2 years ago
parent
commit
2f36da7b09

+ 11 - 8
build.gradle

@@ -1,5 +1,5 @@
 plugins {
-    id 'org.springframework.boot' version '2.7.3' apply(false)
+    id 'org.springframework.boot' version '2.5.14' apply(false)
     id 'io.spring.dependency-management' version '1.0.10.RELEASE' apply(false)
 }
 
@@ -79,7 +79,7 @@ subprojects {
 
         logback_ext_spring = '0.1.5'
 
-        jackson = '2.11.2'
+        jackson = '2.13.1'
         jackson_asl = '1.9.13'
         // ali json
         fastjson = '1.2.58'
@@ -170,7 +170,6 @@ subprojects {
         ibatis_2 = '2.0.0'
 
         javax_validation = '2.0.1.Final'
-        jackson = '2.13.1'
         bitwalker_agent = '1.21'
         jsonwebtoken = '0.9.1'
 
@@ -178,19 +177,23 @@ subprojects {
 }
 
 configure(subprojects.findAll(){
-    it.name == 'songmao-common' || 'eccs-biz'
+    it.name == 'songmao-common'
 }){
-    apply plugin: "org.springframework.boot"
+    apply plugin: 'org.springframework.boot'
     bootJar {
         enabled = false
     }
 }
 
 configure(subprojects.findAll(){
-    it.name == 'eccs-admin' || 'eccs-system'
-            || 'eccs-framework' || 'eccs-generator' || 'eccs-quartz'
+    it.name == 'eccs-admin' || 'eccs-system' || 'eccs-framework' || 'eccs-biz'
+            || 'eccs-generator' || 'eccs-quartz'
 }){
-    apply plugin: "org.springframework.boot"
+    apply plugin: 'org.springframework.boot'
     apply plugin: 'io.spring.dependency-management'
+    bootJar {
+        // 符合条件的子项目不使用bootJar打包方式
+        enabled = false
+    }
 }
 

+ 5 - 3
eccs-admin/build.gradle

@@ -9,7 +9,6 @@ dependencies {
     implementation project(':eccs-common'),
             project(':eccs-framework'),
             project(':eccs-quartz'),
-            project(':eccs-generator'),
             project(':eccs-system'),
             project(':eccs-biz')
 
@@ -23,10 +22,13 @@ dependencies {
     implementation "org.apache.commons:commons-lang3:${commons_lang3}"
     implementation "commons-io:commons-io:${commons_io}"
 
-    implementation "io.springfox:springfox-swagger2:${swagger}"
-    implementation "io.springfox:springfox-swagger-ui:${swagger}"
     implementation "mysql:mysql-connector-java:${mysql}"
 
+    implementation("io.springfox:springfox-swagger2:${swagger}") {
+        exclude group: 'io.swagger', module: 'swagger-models'
+    }
+    implementation "io.springfox:springfox-swagger-ui:${swagger}"
+
 }
 
 description = 'eccs-admin'

+ 8 - 2
eccs-biz/build.gradle

@@ -18,8 +18,6 @@ dependencies {
     implementation 'org.springframework:spring-jdbc'
     implementation 'org.springframework.security:spring-security-web'
 
-    implementation "io.springfox:springfox-swagger2:${swagger}"
-    implementation "io.springfox:springfox-swagger-ui:${swagger}"
     implementation "mysql:mysql-connector-java:${mysql}"
 
     implementation "com.alibaba:fastjson:${fastjson}"
@@ -27,6 +25,14 @@ dependencies {
 
     implementation "org.apache.commons:commons-lang3:${commons_lang3}"
     implementation "org.apache.httpcomponents:httpclient:${apache_httpclient}"
+
+    implementation "com.fasterxml.jackson.core:jackson-databind:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-core:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson}"
+
+    implementation "io.springfox:springfox-swagger2:${swagger}"
+    implementation "io.springfox:springfox-swagger-ui:${swagger}"
+
 }
 
 test {

+ 4 - 0
eccs-common/build.gradle

@@ -13,7 +13,11 @@ dependencies {
     implementation "com.github.pagehelper:pagehelper-spring-boot-starter:${pagehelper_spring_boot_starter}"
     implementation "javax.validation:validation-api:${javax_validation}"
     implementation "org.apache.commons:commons-lang3:${commons_lang3}"
+
     implementation "com.fasterxml.jackson.core:jackson-databind:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-core:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson}"
+
     implementation "com.alibaba:fastjson:${fastjson}"
     implementation "commons-io:commons-io:${commons_io}"
     implementation "commons-fileupload:commons-fileupload:${commons_fileupload}"

+ 2 - 0
eccs-framework/build.gradle

@@ -8,7 +8,9 @@ dependencies {
 
     implementation 'org.springframework.boot:spring-boot-starter-web'
     implementation 'org.springframework.boot:spring-boot-starter-aop'
+
     implementation 'org.springframework.boot:spring-boot-starter-jdbc'
+
     implementation 'org.springframework.security:spring-security-core'
     implementation 'org.springframework.security:spring-security-web'
     implementation 'org.springframework.security:spring-security-config'

+ 4 - 2
eccs-system/build.gradle

@@ -17,10 +17,12 @@ dependencies {
     implementation "tk.mybatis:mapper-spring-boot-starter:${ibatis_2}"
 
     implementation "javax.validation:validation-api:${javax_validation}"
-    implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson}"
-    implementation "eu.bitwalker:UserAgentUtils:${bitwalker_agent}"
 
+    implementation "eu.bitwalker:UserAgentUtils:${bitwalker_agent}"
 
+    implementation "com.fasterxml.jackson.core:jackson-databind:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-core:${jackson}"
+    implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson}"
 
 }