欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 焦点 > Spring Boot 项目启动报 NoClassDefFoundError 异常的原因分析与解决方案 - jackson 版本不一致

Spring Boot 项目启动报 NoClassDefFoundError 异常的原因分析与解决方案 - jackson 版本不一致

2025/1/9 11:27:51 来源:https://blog.csdn.net/gs80140/article/details/144953750  浏览:    关键词:Spring Boot 项目启动报 NoClassDefFoundError 异常的原因分析与解决方案 - jackson 版本不一致

目录

报错: 

问题分析:

解决方案:

方案 1:对 Jackson 版本进行统一

方案 2:升级 Springfox 版本

方案 3:替换 Springfox 为 springdoc-openapi(推荐)

方案 4:排除冲突的 Jackson 依赖

推荐配置示例(使用 Springdoc)

总结


报错:  方案1 解决了问题 

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonKeyat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)at com.slin.zntrade.AdminAPI.main(AdminAPI.java:18)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonKeyat com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)at com.google.common.cache.LocalCache.get(LocalCache.java:4053)at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4057)at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4986)at springfox.documentation.schema.CachingModelProvider.modelFor(CachingModelProvider.java:59)at springfox.documentation.spring.web.scanners.ApiModelReader.read(ApiModelReader.java:69)at springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:133)at springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:71)at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.scanDocumentation(DocumentationPluginsBootstrapper.java:101)at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:167)at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)... 19 common frames omitted
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonKeyat com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)at com.google.common.cache.LocalCache.get(LocalCache.java:4053)at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4057)at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4986)at springfox.documentation.schema.property.CachingModelPropertiesProvider.propertiesFor(CachingModelPropertiesProvider.java:64)at springfox.documentation.schema.DefaultModelProvider.properties(DefaultModelProvider.java:166)at springfox.documentation.schema.DefaultModelProvider.reflectionBasedModel(DefaultModelProvider.java:100)at springfox.documentation.schema.DefaultModelProvider.modelFor(DefaultModelProvider.java:95)at springfox.documentation.schema.CachingModelProvider$1.load(CachingModelProvider.java:51)at springfox.documentation.schema.CachingModelProvider$1.load(CachingModelProvider.java:49)at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3628)at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2295)at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2208)... 29 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonKeyat com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.hasAsKey(JacksonAnnotationIntrospector.java:1200)at com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.hasAsKey(AnnotationIntrospectorPair.java:547)at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:555)at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:478)at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:413)at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:255)at com.fasterxml.jackson.databind.introspect.BasicBeanDescription._properties(BasicBeanDescription.java:164)at com.fasterxml.jackson.databind.introspect.BasicBeanDescription.findProperties(BasicBeanDescription.java:239)at springfox.documentation.schema.property.OptimizedModelPropertiesProvider.propertiesFor(OptimizedModelPropertiesProvider.java:124)at springfox.documentation.schema.property.OptimizedModelPropertiesProvider.propertiesFor(OptimizedModelPropertiesProvider.java:118)at springfox.documentation.schema.property.CachingModelPropertiesProvider$1.load(CachingModelPropertiesProvider.java:56)at springfox.documentation.schema.property.CachingModelPropertiesProvider$1.load(CachingModelPropertiesProvider.java:54)at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3628)at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2295)at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2208)... 42 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonKeyat java.net.URLClassLoader.findClass(URLClassLoader.java:382)at java.lang.ClassLoader.loadClass(ClassLoader.java:418)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)at java.lang.ClassLoader.loadClass(ClassLoader.java:351)... 58 common frames omitted

依赖:

D:\codes\zntrade-parent\admin-api>mvn dependency:tree
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< com.slin.zntrade:admin-api >---------------------
[INFO] Building admin-api 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.slin.zntrade:data:jar:1.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ admin-api ---
[INFO] com.slin.zntrade:admin-api:jar:1.0-SNAPSHOT
[INFO] +- org.xhtmlrenderer:flying-saucer-pdf:jar:9.0.7:compile
[INFO] |  +- com.lowagie:itext:jar:2.1.7:compile
[INFO] |  |  +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] |  |  +- bouncycastle:bcprov-jdk14:jar:138:compile
[INFO] |  |  \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] |  |     +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] |  |     \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] |  \- org.xhtmlrenderer:flying-saucer-core:jar:9.0.7:compile
[INFO] +- com.slin.zntrade:common:jar:1.0-SNAPSHOT:compile
[INFO] |  +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  |  +- com.google.guava:guava:jar:20.0:compile
[INFO] |  |  +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.21:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.83:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.8:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  +- com.auth0:java-jwt:jar:3.2.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.17.0:compile
[INFO] |  |  |  \- net.bytebuddy:byte-buddy:jar:1.10.17:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.14:compile
[INFO] |  |  \- org.bouncycastle:bcprov-jdk15on:jar:1.55:compile
[INFO] |  +- cn.hutool:hutool-all:jar:5.8.1:compile
[INFO] |  +- com.vdurmont:emoji-java:jar:5.1.1:compile
[INFO] |  |  \- org.json:json:jar:20170516:compile
[INFO] |  +- com.belerweb:pinyin4j:jar:2.5.1:compile
[INFO] |  +- org.apache.shiro:shiro-spring:jar:1.9.1:compile
[INFO] |  |  +- org.apache.shiro:shiro-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-crypto-hash:jar:1.9.1:compile
[INFO] |  |  |  |  \- org.apache.shiro:shiro-crypto-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-crypto-cipher:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-config-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-config-ogdl:jar:1.9.1:compile
[INFO] |  |  |  \- org.apache.shiro:shiro-event:jar:1.9.1:compile
[INFO] |  |  \- org.apache.shiro:shiro-web:jar:1.9.1:compile
[INFO] |  |     \- org.owasp.encoder:encoder:jar:1.2.2:compile
[INFO] |  +- org.springframework:spring-web:jar:5.2.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.2.10.RELEASE:compile
[INFO] |  +- junit:junit:jar:4.12:compile
[INFO] |  +- io.netty:netty-all:jar:4.1.53.Final:compile
[INFO] |  +- com.squareup.okio:okio:jar:2.2.2:compile
[INFO] |  |  \- org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.72:runtime
[INFO] |  |     +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.3.72:runtime
[INFO] |  |     \- org.jetbrains:annotations:jar:13.0:runtime
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  \- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] +- com.slin.zntrade:data:jar:1.0-SNAPSHOT:compile
[INFO] +- com.slin.zntrade:obs:jar:1.0-SNAPSHOT:compile
[INFO] |  +- net.coobird:thumbnailator:jar:0.4.8:compile
[INFO] |  +- com.huaweicloud:esdk-obs-java:jar:3.19.7:compile
[INFO] |  |  +- com.jamesmurty.utils:java-xmlbuilder:jar:1.1:compile
[INFO] |  |  +- com.squareup.okhttp3:okhttp:jar:3.14.9:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.17.0:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-core:jar:2.13.3:compile
[INFO] |  |  \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] |  \- org.springframework:spring-context:jar:5.2.10.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.2.10.RELEASE:compile
[INFO] +- com.slin.zntrade:generator:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.velocity:velocity-engine-core:jar:2.0:compile
[INFO] |  +- org.freemarker:freemarker:jar:2.3.30:compile
[INFO] |  +- com.ibeetl:beetl:jar:2.9.9:compile
[INFO] |  |  \- org.antlr:antlr4-runtime:jar:4.2:compile
[INFO] |  |     +- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:compile
[INFO] |  |     \- org.antlr:antlr4-annotations:jar:4.2:compile
[INFO] |  \- com.baomidou:mybatis-plus-generator:jar:3.4.1:compile
[INFO] |     \- com.baomidou:mybatis-plus-extension:jar:3.4.1:compile
[INFO] |        +- com.baomidou:mybatis-plus-core:jar:3.4.1:compile
[INFO] |        |  +- com.baomidou:mybatis-plus-annotation:jar:3.4.1:compile
[INFO] |        |  +- com.github.jsqlparser:jsqlparser:jar:3.2:compile
[INFO] |        |  \- org.mybatis:mybatis:jar:3.5.6:compile
[INFO] |        \- org.mybatis:mybatis-spring:jar:2.0.5:compile
[INFO] +- com.slin.zntrade:admin-ui:jar:1.0-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.3.5.RELEASE:compile
[INFO] |  \- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.3.5.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.26:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.3:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.39:compile
[INFO] |  |  +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.39:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.3.5.RELEASE:compile
[INFO] |  +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] |  \- org.springframework:spring-jdbc:jar:5.2.10.RELEASE:compile
[INFO] |     \- org.springframework:spring-tx:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.2.10.RELEASE:compile
[INFO] |  \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] |  +- org.assertj:assertj-core:jar:3.16.1:compile
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.6.3:compile
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.6.3:compile
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:compile
[INFO] |  |  |  \- org.junit.platform:junit-platform-commons:jar:1.6.3:compile
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.6.3:compile
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.3:runtime
[INFO] |  +- org.junit.vintage:junit-vintage-engine:jar:5.6.3:compile
[INFO] |  |  \- org.junit.platform:junit-platform-engine:jar:1.6.3:compile
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:3.3.3:compile
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:compile
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] |  +- org.springframework:spring-core:jar:5.2.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.2.10.RELEASE:compile
[INFO] |  +- org.springframework:spring-test:jar:5.2.10.RELEASE:compile
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.7.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:2.3.5.RELEASE:compile
[INFO] |  \- org.springframework:spring-context-support:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.3.5.RELEASE:compile
[INFO] |  \- com.sun.mail:jakarta.mail:jar:1.6.5:compile
[INFO] |     \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.19:compile
[INFO] |  \- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] +- commons-io:commons-io:jar:2.6:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] |  \- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] +- com.yunpian.sdk:yunpian-java-sdk:jar:1.2.6:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] |  +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.13:compile
[INFO] |  +- org.apache.httpcomponents:httpasyncclient-cache:jar:4.1.2:compile
[INFO] |  |  \- org.apache.httpcomponents:httpclient-cache:jar:4.5.13:compile
[INFO] |  \- org.apache.httpcomponents:httpmime:jar:4.5.13:compile
[INFO] +- com.aliyun.oss:aliyun-sdk-oss:jar:3.0.0:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] |  +- org.jdom:jdom:jar:1.1:compile
[INFO] |  +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] |  |  +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] |  |  |  \- stax:stax-api:jar:1.0.1:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-core:jar:3.4.0:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-ram:jar:3.0.0:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-sts:jar:3.0.0:compile
[INFO] |  \- com.aliyun:aliyun-java-sdk-ecs:jar:4.2.0:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.22:provided
[INFO] +- io.cucumber:cucumber-java:jar:5.1.3:test
[INFO] |  +- io.cucumber:cucumber-core:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:cucumber-gherkin:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:cucumber-gherkin-vintage:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:tag-expressions:jar:2.0.4:test
[INFO] |  |  +- io.cucumber:cucumber-expressions:jar:8.3.1:test
[INFO] |  |  +- io.cucumber:datatable:jar:3.2.1:test
[INFO] |  |  +- io.cucumber:cucumber-plugin:jar:5.1.3:test
[INFO] |  |  \- io.cucumber:docstring:jar:5.1.3:test
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] +- io.cucumber:cucumber-junit:jar:5.1.3:test
[INFO] +- io.cucumber:cucumber-spring:jar:5.1.3:test
[INFO] +- com.google.zxing:core:jar:3.3.3:compile
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.9:test
[INFO] |  +- org.powermock:powermock-module-junit4-common:jar:2.0.9:test
[INFO] |  |  +- org.powermock:powermock-reflect:jar:2.0.9:test
[INFO] |  |  |  \- net.bytebuddy:byte-buddy-agent:jar:1.10.17:test
[INFO] |  |  \- org.powermock:powermock-core:jar:2.0.9:test
[INFO] |  |     \- org.javassist:javassist:jar:3.27.0-GA:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:2.2:compile
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.9:test
[INFO] |  +- org.powermock:powermock-api-support:jar:2.0.9:test
[INFO] |  \- org.mockito:mockito-core:jar:3.3.3:test
[INFO] |     \- org.objenesis:objenesis:jar:2.6:test
[INFO] +- de.codecentric:spring-boot-admin-starter-client:jar:2.3.1:compile
[INFO] |  \- de.codecentric:spring-boot-admin-client:jar:2.3.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.3.5.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.5.6:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- org.apache.shiro:shiro-ehcache:jar:1.9.1:compile
[INFO] |  +- org.apache.shiro:shiro-cache:jar:1.9.1:compile
[INFO] |  |  \- org.apache.shiro:shiro-lang:jar:1.9.1:compile
[INFO] |  \- net.sf.ehcache:ehcache-core:jar:2.6.11:compile
[INFO] +- com.github.javen205:IJPay-WxPay:jar:2.8.1:compile
[INFO] |  \- com.github.javen205:IJPay-Core:jar:2.8.1:compile
[INFO] |     +- com.google.zxing:javase:jar:3.5.0:compile
[INFO] |     |  +- com.beust:jcommander:jar:1.82:compile
[INFO] |     |  \- com.github.jai-imageio:jai-imageio-core:jar:1.4.0:runtime
[INFO] |     \- com.github.xkzhangsan:xk-time:jar:3.2.3.Mini:compile
[INFO] +- com.github.javen205:IJPay-AliPay:jar:2.8.1:compile
[INFO] |  \- com.alipay.sdk:alipay-sdk-java:jar:4.22.113.ALL:compile
[INFO] |     \- dom4j:dom4j:jar:1.6.1:compile
[INFO] |        \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- com.github.javen205:IJPay-PayPal:jar:2.8.1:compile
[INFO] \- org.springframework.boot:spring-boot-starter-security:jar:2.3.5.RELEASE:compile
[INFO]    +- org.springframework.security:spring-security-config:jar:5.3.5.RELEASE:compile
[INFO]    |  \- org.springframework.security:spring-security-core:jar:5.3.5.RELEASE:compile
[INFO]    \- org.springframework.security:spring-security-web:jar:5.3.5.RELEASE:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.547 s
[INFO] Finished at: 2025-01-06T00:40:11+08:00
[INFO] ------------------------------------------------------------------------D:\codes\zntrade-parent\admin-api>mvn dependency:treeD:\codes\zntrade-parent\admin-api>mvn dependency:tree
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< com.slin.zntrade:admin-api >---------------------
[INFO] Building admin-api 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.slin.zntrade:data:jar:1.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ admin-api ---
[INFO] com.slin.zntrade:admin-api:jar:1.0-SNAPSHOT
[INFO] +- org.xhtmlrenderer:flying-saucer-pdf:jar:9.0.7:compile
[INFO] |  +- com.lowagie:itext:jar:2.1.7:compile
[INFO] |  |  +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] |  |  +- bouncycastle:bcprov-jdk14:jar:138:compile
[INFO] |  |  \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] |  |     +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] |  |     \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] |  \- org.xhtmlrenderer:flying-saucer-core:jar:9.0.7:compile
[INFO] +- com.slin.zntrade:common:jar:1.0-SNAPSHOT:compile
[INFO] |  +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  |  +- com.google.guava:guava:jar:20.0:compile
[INFO] |  |  +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.21:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.83:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.8:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  +- com.auth0:java-jwt:jar:3.2.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.17.0:compile
[INFO] |  |  |  \- net.bytebuddy:byte-buddy:jar:1.10.17:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.14:compile
[INFO] |  |  \- org.bouncycastle:bcprov-jdk15on:jar:1.55:compile
[INFO] |  +- cn.hutool:hutool-all:jar:5.8.1:compile
[INFO] |  +- com.vdurmont:emoji-java:jar:5.1.1:compile
[INFO] |  |  \- org.json:json:jar:20170516:compile
[INFO] |  +- com.belerweb:pinyin4j:jar:2.5.1:compile
[INFO] |  +- org.apache.shiro:shiro-spring:jar:1.9.1:compile
[INFO] |  |  +- org.apache.shiro:shiro-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-crypto-hash:jar:1.9.1:compile
[INFO] |  |  |  |  \- org.apache.shiro:shiro-crypto-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-crypto-cipher:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-config-core:jar:1.9.1:compile
[INFO] |  |  |  +- org.apache.shiro:shiro-config-ogdl:jar:1.9.1:compile
[INFO] |  |  |  \- org.apache.shiro:shiro-event:jar:1.9.1:compile
[INFO] |  |  \- org.apache.shiro:shiro-web:jar:1.9.1:compile
[INFO] |  |     \- org.owasp.encoder:encoder:jar:1.2.2:compile
[INFO] |  +- org.springframework:spring-web:jar:5.2.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.2.10.RELEASE:compile
[INFO] |  +- junit:junit:jar:4.12:compile
[INFO] |  +- io.netty:netty-all:jar:4.1.53.Final:compile
[INFO] |  +- com.squareup.okio:okio:jar:2.2.2:compile
[INFO] |  |  \- org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.72:runtime
[INFO] |  |     +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.3.72:runtime
[INFO] |  |     \- org.jetbrains:annotations:jar:13.0:runtime
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  \- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] +- com.slin.zntrade:data:jar:1.0-SNAPSHOT:compile
[INFO] +- com.slin.zntrade:obs:jar:1.0-SNAPSHOT:compile
[INFO] |  +- net.coobird:thumbnailator:jar:0.4.8:compile
[INFO] |  +- com.huaweicloud:esdk-obs-java:jar:3.19.7:compile
[INFO] |  |  +- com.jamesmurty.utils:java-xmlbuilder:jar:1.1:compile
[INFO] |  |  +- com.squareup.okhttp3:okhttp:jar:3.14.9:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.17.0:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-core:jar:2.13.3:compile
[INFO] |  |  \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] |  \- org.springframework:spring-context:jar:5.2.10.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.2.10.RELEASE:compile
[INFO] +- com.slin.zntrade:generator:jar:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.velocity:velocity-engine-core:jar:2.0:compile
[INFO] |  +- org.freemarker:freemarker:jar:2.3.30:compile
[INFO] |  +- com.ibeetl:beetl:jar:2.9.9:compile
[INFO] |  |  \- org.antlr:antlr4-runtime:jar:4.2:compile
[INFO] |  |     +- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:compile
[INFO] |  |     \- org.antlr:antlr4-annotations:jar:4.2:compile
[INFO] |  \- com.baomidou:mybatis-plus-generator:jar:3.4.1:compile
[INFO] |     \- com.baomidou:mybatis-plus-extension:jar:3.4.1:compile
[INFO] |        +- com.baomidou:mybatis-plus-core:jar:3.4.1:compile
[INFO] |        |  +- com.baomidou:mybatis-plus-annotation:jar:3.4.1:compile
[INFO] |        |  +- com.github.jsqlparser:jsqlparser:jar:3.2:compile
[INFO] |        |  \- org.mybatis:mybatis:jar:3.5.6:compile
[INFO] |        \- org.mybatis:mybatis-spring:jar:2.0.5:compile
[INFO] +- com.slin.zntrade:admin-ui:jar:1.0-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.3.5.RELEASE:compile
[INFO] |  \- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.3.5.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.26:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.3:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.3:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.5.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.39:compile
[INFO] |  |  +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.39:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.3.5.RELEASE:compile
[INFO] |  +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] |  \- org.springframework:spring-jdbc:jar:5.2.10.RELEASE:compile
[INFO] |     \- org.springframework:spring-tx:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.2.10.RELEASE:compile
[INFO] |  \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] |  +- org.assertj:assertj-core:jar:3.16.1:compile
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.6.3:compile
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.6.3:compile
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:compile
[INFO] |  |  |  \- org.junit.platform:junit-platform-commons:jar:1.6.3:compile
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.6.3:compile
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.3:runtime
[INFO] |  +- org.junit.vintage:junit-vintage-engine:jar:5.6.3:compile
[INFO] |  |  \- org.junit.platform:junit-platform-engine:jar:1.6.3:compile
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:3.3.3:compile
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:compile
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] |  +- org.springframework:spring-core:jar:5.2.10.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.2.10.RELEASE:compile
[INFO] |  +- org.springframework:spring-test:jar:5.2.10.RELEASE:compile
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.7.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:2.3.5.RELEASE:compile
[INFO] |  \- org.springframework:spring-context-support:jar:5.2.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.3.5.RELEASE:compile
[INFO] |  \- com.sun.mail:jakarta.mail:jar:1.6.5:compile
[INFO] |     \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.19:compile
[INFO] |  \- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] +- commons-io:commons-io:jar:2.6:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] |  \- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] +- com.yunpian.sdk:yunpian-java-sdk:jar:1.2.6:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] |  +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] |  +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.13:compile
[INFO] |  +- org.apache.httpcomponents:httpasyncclient-cache:jar:4.1.2:compile
[INFO] |  |  \- org.apache.httpcomponents:httpclient-cache:jar:4.5.13:compile
[INFO] |  \- org.apache.httpcomponents:httpmime:jar:4.5.13:compile
[INFO] +- com.aliyun.oss:aliyun-sdk-oss:jar:3.0.0:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] |  +- org.jdom:jdom:jar:1.1:compile
[INFO] |  +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] |  |  +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] |  |  |  \- stax:stax-api:jar:1.0.1:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-core:jar:3.4.0:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-ram:jar:3.0.0:compile
[INFO] |  +- com.aliyun:aliyun-java-sdk-sts:jar:3.0.0:compile
[INFO] |  \- com.aliyun:aliyun-java-sdk-ecs:jar:4.2.0:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.22:provided
[INFO] +- io.cucumber:cucumber-java:jar:5.1.3:test
[INFO] |  +- io.cucumber:cucumber-core:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:cucumber-gherkin:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:cucumber-gherkin-vintage:jar:5.1.3:test
[INFO] |  |  +- io.cucumber:tag-expressions:jar:2.0.4:test
[INFO] |  |  +- io.cucumber:cucumber-expressions:jar:8.3.1:test
[INFO] |  |  +- io.cucumber:datatable:jar:3.2.1:test
[INFO] |  |  +- io.cucumber:cucumber-plugin:jar:5.1.3:test
[INFO] |  |  \- io.cucumber:docstring:jar:5.1.3:test
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] +- io.cucumber:cucumber-junit:jar:5.1.3:test
[INFO] +- io.cucumber:cucumber-spring:jar:5.1.3:test
[INFO] +- com.google.zxing:core:jar:3.3.3:compile
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.9:test
[INFO] |  +- org.powermock:powermock-module-junit4-common:jar:2.0.9:test
[INFO] |  |  +- org.powermock:powermock-reflect:jar:2.0.9:test
[INFO] |  |  |  \- net.bytebuddy:byte-buddy-agent:jar:1.10.17:test
[INFO] |  |  \- org.powermock:powermock-core:jar:2.0.9:test
[INFO] |  |     \- org.javassist:javassist:jar:3.27.0-GA:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:2.2:compile
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.9:test
[INFO] |  +- org.powermock:powermock-api-support:jar:2.0.9:test
[INFO] |  \- org.mockito:mockito-core:jar:3.3.3:test
[INFO] |     \- org.objenesis:objenesis:jar:2.6:test
[INFO] +- de.codecentric:spring-boot-admin-starter-client:jar:2.3.1:compile
[INFO] |  \- de.codecentric:spring-boot-admin-client:jar:2.3.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.3.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.3.5.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.3.5.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.5.6:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- org.apache.shiro:shiro-ehcache:jar:1.9.1:compile
[INFO] |  +- org.apache.shiro:shiro-cache:jar:1.9.1:compile
[INFO] |  |  \- org.apache.shiro:shiro-lang:jar:1.9.1:compile
[INFO] |  \- net.sf.ehcache:ehcache-core:jar:2.6.11:compile
[INFO] +- com.github.javen205:IJPay-WxPay:jar:2.8.1:compile
[INFO] |  \- com.github.javen205:IJPay-Core:jar:2.8.1:compile
[INFO] |     +- com.google.zxing:javase:jar:3.5.0:compile
[INFO] |     |  +- com.beust:jcommander:jar:1.82:compile
[INFO] |     |  \- com.github.jai-imageio:jai-imageio-core:jar:1.4.0:runtime
[INFO] |     \- com.github.xkzhangsan:xk-time:jar:3.2.3.Mini:compile
[INFO] +- com.github.javen205:IJPay-AliPay:jar:2.8.1:compile
[INFO] |  \- com.alipay.sdk:alipay-sdk-java:jar:4.22.113.ALL:compile
[INFO] |     \- dom4j:dom4j:jar:1.6.1:compile
[INFO] |        \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- com.github.javen205:IJPay-PayPal:jar:2.8.1:compile
[INFO] \- org.springframework.boot:spring-boot-starter-security:jar:2.3.5.RELEASE:compile
[INFO]    +- org.springframework.security:spring-security-config:jar:5.3.5.RELEASE:compile
[INFO]    |  \- org.springframework.security:spring-security-core:jar:5.3.5.RELEASE:compile
[INFO]    \- org.springframework.security:spring-security-web:jar:5.3.5.RELEASE:compile

解决方案:

根据 mvn dependency:tree 输出,可以看到项目中存在多个版本的 Jackson 依赖以及 Springfox 的版本不一致问题。这些问题导致 JsonKey 类无法加载。以下是详细的分析和解决步骤。


问题分析

  1. Jackson 版本冲突

    • jackson-annotations 版本:2.11.3
    • jackson-databind 版本:2.17.0
    • jackson-core 版本:2.17.0

    jackson-annotations 版本明显落后于 databindcore,可能导致 JsonKey 类在新版本中存在,而旧版本中不存在。

  2. Springfox 版本问题

    • springfox-swagger2:2.9.2 版本不兼容 Spring Boot 2.3.x+
    • Springfox 2.x 使用较老版本的 Jackson,而 Spring Boot 2.3.5.RELEASE 使用较新版本的 Jackson

解决方案

方案 1:对 Jackson 版本进行统一

  • pom.xml 中手动添加 Jackson 依赖,并统一版本,例如:
    <dependencyManagement><dependencies><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>2.17.0</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.17.0</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.17.0</version></dependency></dependencies>
    </dependencyManagement>
    

方案 2:升级 Springfox 版本

  • 升级 springfox-swagger2springfox-swagger-ui 依赖为 3.x 版本:
    <dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId><version>3.0.0</version>
    </dependency>
    
  • 并删除以下旧版本:
    <dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version>
    </dependency>
    <dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>2.9.2</version>
    </dependency>
    

方案 3:替换 Springfoxspringdoc-openapi(推荐)

Springdoc-openapi 是官方推荐的新替代方案:

  1. 添加 springdoc-openapi 依赖:
    <dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-ui</artifactId><version>1.6.15</version>
    </dependency>
    
  2. springdoc-openapi 与 Spring Boot 集成更好,自动生成 /swagger-ui.html 接口文档。

方案 4:排除冲突的 Jackson 依赖

  • 修改 pom.xml,排除 swagger-models 中自带的 jackson-annotations
    <dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version><exclusions><exclusion><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId></exclusion></exclusions>
    </dependency>
    

推荐配置示例(使用 Springdoc)

<dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-ui</artifactId><version>1.6.15</version>
</dependency>

这样可避免 Springfox 带来的版本兼容问题。


总结

  • 如果想继续使用 Springfox,建议升级到 3.0.0 版本并统一 Jackson 版本。
  • 推荐使用 springdoc-openapi 替换 Springfox,简化依赖管理和 Spring Boot 版本兼容问题。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com