Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 类依赖错误';org/springframework/context/event/EventListenerFactory';在方面定义';方面定义_Java_Xml_Spring - Fatal编程技术网

Java 类依赖错误';org/springframework/context/event/EventListenerFactory';在方面定义';方面定义

Java 类依赖错误';org/springframework/context/event/EventListenerFactory';在方面定义';方面定义,java,xml,spring,Java,Xml,Spring,我是春天的新手。在配置root-context.xml时。我的错误是: 类依赖项错误“org/springframework/context/event/EventListenerFactory”发生在方面定义“方面定义”上。对此问题的任何解决方案都将受到高度赞赏 这是我的根上下文文件: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.o

我是春天的新手。在配置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">

这是我的pom.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>com.mhs</groupId>
    <artifactId>studentInfoSystem</artifactId>
    <name>StudentInfoSystem</name>
    <packaging>war</packaging>
    <version>1.0.0-BUILD-SNAPSHOT</version>
    <properties>
        <java-version>1.8</java-version>
        <org.springframework-version>5.0.8.RELEASE</org.springframework-version>
        <org.aspectj-version>1.6.10</org.aspectj-version>
        <org.slf4j-version>1.6.6</org.slf4j-version>
    </properties>
    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework-version}</version>
            <exclusions>

4.0.0
com.mhs
学生信息系统
学生信息系统
战争
1.0.0-BUILD-SNAPSHOT
1.8
5.0.8.1发布
1.6.10
1.6.6
org.springframework
spring上下文
${org.springframework版本}

将此行中的版本
${org.springframework version}
更改为
4.2.6.RELEASE
,您将解决您的问题

看看这个例子:

   <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.2.6.RELEASE</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                 </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>

org.springframework
spring上下文
4.2.6.1发布
公用记录
公用记录
org.springframework
SpringWebMVC
${org.springframework版本}

谢谢你,梅多,你救了我。