在 Wildfly16 上部署 Spring 应用程序时出错(从 Wildfly8 迁移到 16)

Getting Error While deploying Spring application on Wildfly16 (Migrating from Wildfly8 to 16)

我正在进行从 spring 4 到 5 以及从 JDK 8 到 11 的迁移,并将其部署到 wildfly 16 上。我已经构建了 .war 文件并打开了 JDK 11,并尝试将其部署在 wildfly 16 上,但它抛出错误堆栈以下:

13:39:12,877 {} ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 79) Context initialization failed: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonT
arget(Ljava/lang/Object;)Ljava/lang/Object;
        at deployment.memberinfoservice.war//org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:109)
        at deployment.memberinfoservice.war//org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:825)
        at deployment.memberinfoservice.war//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at deployment.memberinfoservice.war//org.jboss.resteasy.plugins.spring.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:57)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.call(DeploymentManagerImpl.java:216)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.call(DeploymentManagerImpl.java:185)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction.call(ServletRequestContextThreadSetupAction.java:42)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction.call(ContextClassLoaderSetupAction.java:43)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create[=11=](SecurityContextThreadSetupAction.java:105)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.run(UndertowDeploymentService.java:78)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.base/java.lang.Thread.run(Thread.java:834)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)

13:39:12,927 {} ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 79) MSC000001: Failed to start service jboss.deployment.unit."memberinfoservice.war".undertow-deployment: org.jboss.msc.service.StartException in servi
ce jboss.deployment.unit."memberinfoservice.war".undertow-deployment: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.run(UndertowDeploymentService.java:81)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.base/java.lang.Thread.run(Thread.java:834)
        at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
        at deployment.memberinfoservice.war//org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:109)
        at deployment.memberinfoservice.war//org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:825)
        at deployment.memberinfoservice.war//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at deployment.memberinfoservice.war//org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at deployment.memberinfoservice.war//org.jboss.resteasy.plugins.spring.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:57)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.call(DeploymentManagerImpl.java:216)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.call(DeploymentManagerImpl.java:185)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction.call(ServletRequestContextThreadSetupAction.java:42)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction.call(ContextClassLoaderSetupAction.java:43)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create[=11=](SecurityContextThreadSetupAction.java:105)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=11=](UndertowDeploymentInfoService.java:1502)
        at io.undertow.servlet@2.0.19.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
        at org.wildfly.extension.undertow@16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.run(UndertowDeploymentService.java:78)
        ... 8 more

13:39:12,986 {} ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "memberinfoservice.war")]) - failure description: {"WFLYCTL0080: Fa
iled services" => {"jboss.deployment.unit.\"memberinfoservice.war\".undertow-deployment" => "java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
    Caused by: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;"}}
13:39:13,074 {} INFO  [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "memberinfoservice.war" (runtime-name : "memberinfoservice.war")
13:39:13,100 {} INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."memberinfoservice.war".undertow-deployment: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lan
g/Object;)Ljava/lang/Object;
WFLYCTL0448: 1 additional services are down due to their dependencies being missing or failed
13:39:13,175 {} INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:39:13,181 {} INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
13:39:13,183 {} INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
13:39:13,186 {} ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started (with errors) in 19160ms - Started 460 of 725 services (3 services failed or missing depe
ndencies, 414 services are lazy, passive or on-demand)

显示 spring-aop 中缺少一些 class,有人知道如何解决这个错误吗?

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <url>http://maven.apache.org</url>
    <properties>
        <java.version>11</java.version>
        <springframework.version>5.1.5.RELEASE</springframework.version>
        <resteasy.version>3.0.19.Final</resteasy.version>
        <metrics.spring.version>3.1.2</metrics.spring.version>
    </properties>
        <repository>
            <id>JBoss repository</id>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>central</id>
            <name>libs-release</name>
            <url>http://obuartifactoryvip.prod.ch3.s.com/artifactory/libs-release</url>
        </repository>
        <repository>
            <snapshots />
            <id>snapshots</id>
            <name>libs-snapshot</name>
            <url>http://obuartifactoryvip.prod.ch3.s.com/artifactory/libs-snapshot</url>
        </repository>
    </repositories>
    <dependencies>

        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
            <version>${metrics.spring.version}</version>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-annotation</artifactId>
            <version>${metrics.spring.version}</version>
        </dependency>

        <dependency>
            <groupId>com.ryantenney.metrics</groupId>
            <artifactId>metrics-spring</artifactId>
            <version>${metrics.spring.version}</version>

            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-healthchecks</artifactId>
            <version>${metrics.spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.2</version>
        </dependency>
        <!-- Spring dependencies start -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${springframework.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${springframework.version}</version>           
        </dependency>
        <!-- <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> 
            <version>1.7.4</version> </dependency> -->
        <!-- Spring dependencies end -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.24</version>
        </dependency>
        <!-- Apache axis 2 jars start -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-kernel</artifactId>
            <version>1.6.2</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.14</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.14</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.commons.schema</groupId>
            <artifactId>XmlSchema</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jta_1.1_spec</artifactId>
            <version>1.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- Apache axis 2 jars end -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>3.9.0.Final</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>resteasy-jaxrs</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-multipart-provider</artifactId>
            <version>${resteasy.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-spring</artifactId> 
            <version>3.6.3.Final</version> <scope>provided</scope> <exclusions> <exclusion> 
            <artifactId>commons-logging</artifactId> <groupId>commons-logging</groupId> 
            </exclusion> <exclusion> <artifactId>jaxb-impl</artifactId> <groupId>com.sun.xml.bind</groupId> 
            </exclusion> <exclusion> <artifactId>sjsxp</artifactId> <groupId>com.sun.xml.stream</groupId> 
            </exclusion> <exclusion> <artifactId>jsr250-api</artifactId> <groupId>javax.annotation</groupId> 
            </exclusion> <exclusion> <artifactId>activation</artifactId> <groupId>javax.activation</groupId> 
            </exclusion> </exclusions> </dependency> -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.9</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.9</version>
            <classifier>jdk15</classifier>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20090211</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.19</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.7.2</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.10</version>
        </dependency>
        <!-- <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> 
            <version>1.8.3</version> </dependency> -->
        <dependency>
            <groupId>com.rabbitmq</groupId>
            <artifactId>amqp-client</artifactId>
            <version>3.0.4</version>
        </dependency>

        <dependency>
            <groupId>com.shc.uemp</groupId>
            <artifactId>monitoring-framework</artifactId>
            <version>0.0.3.1-SNAPSHOT</version>
        </dependency>


        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>4.1.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>4.1.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.11</version>
        </dependency>
    <!--    <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.6.11</version>
        </dependency> -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>1.1</version>
        </dependency>


        <!-- JDK 11 Migration -->
        <!-- START -->

        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>2.3.1</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>rt</artifactId>
            <version>2.3.1</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.4.0-b180830.0438</version>
        </dependency>


        <!-- END -->
    </dependencies>
</project>

Spring 依赖层次结构:

 +- com.ryantenney.metrics:metrics-spring:jar:3.1.2:compile
 +- org.springframework:spring-beans:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-jdbc:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-core:jar:5.1.5.RELEASE:compile
 |  \- org.springframework:spring-jcl:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-context:jar:5.1.5.RELEASE:compile
 |  \- org.springframework:spring-expression:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-web:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-tx:jar:5.1.5.RELEASE:compile
 +- org.springframework:spring-aspects:jar:5.1.5.RELEASE:compile
 |  \- org.aspectj:aspectjweaver:jar:1.9.2:compile
 +- org.springframework:spring-context-support:jar:4.1.4.RELEASE:compile
 +- org.springframework:spring-aop:jar:4.1.4.RELEASE:compile
 |  \- aopalliance:aopalliance:jar:1.0:compile

您混合了 Spring 框架依赖项的版本。例如,根据 mvn dependency:tree 输出,您有 spring-aop 4.1.4.RELEASE 和 spring-core 5.1.5.RELEASE。那行不通,因为 4.X 与 5.X.

不兼容

您必须对所有 Spring 框架依赖项使用相同的版本。