猿问

方面定义“方面定义”上发生类依赖错误

我是春天的新手。在配置 root-context.xml 时。我收到一条错误消息:在方面定义“方面定义”上发生类依赖错误“org/springframework/context/event/EventListenerFactory”。对此问题的任何解决方案都将受到高度赞赏。


这是我的根上下文文件:


<beans xmlns="http://www.springframework.org/schema/beans"

    xmlns:mvc="http://www.springframework.org/schema/mvc"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:p="http://www.springframework.org/schema/p"

    xmlns:tx="http://www.springframework.org/schema/tx"

    xmlns:context="http://www.springframework.org/schema/context"

    xmlns:security="http://www.springframework.org/schema/security"

    xmlns:oauth="http://www.springframework.org/schema/security/oauth2"

    xmlns:util="http://www.springframework.org/schema/util"

    xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd

        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd

        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd

        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd

        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd

        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd

        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">




忽然笑
浏览 150回答 1
1回答

天涯尽头无女友

将此行中的版本更改<version>${org.springframework-version}</version>为<version>4.2.6.RELEASE</version>,您将解决您的问题。看看这个例子:&nbsp; &nbsp;<dependencies>&nbsp; &nbsp; &nbsp; &nbsp; <!-- Spring -->&nbsp; &nbsp; &nbsp; &nbsp; <dependency>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <groupId>org.springframework</groupId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <artifactId>spring-context</artifactId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <version>4.2.6.RELEASE</version>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <exclusions>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!-- Exclude Commons Logging in favor of SLF4j -->&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <exclusion>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <groupId>commons-logging</groupId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <artifactId>commons-logging</artifactId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</exclusion>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </exclusions>&nbsp; &nbsp; &nbsp; &nbsp; </dependency>&nbsp; &nbsp; &nbsp; &nbsp; <dependency>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <groupId>org.springframework</groupId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <artifactId>spring-webmvc</artifactId>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <version>${org.springframework-version}</version>&nbsp; &nbsp; &nbsp; &nbsp; </dependency>
随时随地看视频慕课网APP

相关分类

Java
我要回答