Spring 使用 apache 轴问题启动 2.2.6 应用程序

Spring boot 2.2.6 application with apache axis Issue

我的问题与这个类似(),但我是运行 Spring Boot v2.2.6。当我执行命令时

java -jar -Dspring.profiles.active=local myjar-0.0.1-SNAPSHOT.jar

我收到错误

2021-06-01 00:41:53,152 myjar [http-nio-9090-exec-1] ERROR 
org.apache.axis2.deployment.ModuleDeployer - deploy:94 - The addressing-1.6.3-classpath- 
module.jar module, which is not valid, caused The /Users/xxxx/workspace/myjar/build/libs/myjar-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath- 
module.jar file cannot be found.
org.apache.axis2.AxisFault: The /Users/xxxx/workspace/.../build/libs/myjar-0.0.1- 
SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-module.jar file cannot be found.
    

我也有相关的 build.gradle 片段

api "org.apache.axis2:addressing:1.6.3:classpath-module"
api "org.apache.axis2:axis2:1.6.3"
api "org.apache.axis2:axis2-adb:1.6.3"
api "org.apache.axis2:axis2-transport-local:1.6.3"
api "org.apache.axis2:axis2-transport-http:1.6.3"

我确认 /Users/xxxx/workspace/myjar/build/libs/myjar-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-module.jar 文件确实存在。谁能帮忙解决这个问题?

Axis 似乎无法处理一个 jar 文件嵌套在另一个文件中。对于这种情况,您可以在启动应用程序时configure Spring Boot to automatically unpack the nested jar

bootJar {
    requiresUnpack '**/addressing-*-classpath-module.jar'
}