引入了一个maven项目
springmvc内容:
 <!--自定义参数绑定组件-->
    <bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
        <!-- 转换器 -->
        <property name="converters">
            <set>
                <!-- 日期类型转换 -->
                <bean class="cn.goodym.controller.converter.CustomDateConverter"/>
            </set>
        </property>
    </bean>
后报错:
Multiple annotations found at this line:
- Class 'org.springframework.format.support.FormattingConversionServiceFactoryBean' not found [config set: 
 Examination_System/web-context]
- Class 'org.springframework.format.support.FormattingConversionServiceFactoryBean' not found
以下是pom.xml内容
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>cn.goodym</groupId>
  <artifactId>Examination_System</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <dependencies>
   <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>    <!--servletAPI-->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>    <!--shiro依赖-->
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-core</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-web</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-spring</artifactId>
      <version>1.2.3</version>
    </dependency>    <!--spring-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>4.3.8.RELEASE</version>
    </dependency>    <!--springWEB-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>4.3.8.RELEASE</version>
    </dependency>    <!--springMVC-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>4.3.7.RELEASE</version>
    </dependency>    <!--spring tx 事务处理-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>4.3.8.RELEASE</version>
    </dependency>
    
     
        <!--spring aop-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>4.3.9.RELEASE</version>
    </dependency>    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>1.8.10</version>
    </dependency>    <!--spring-jdbc-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>4.2.5.RELEASE</version>
    </dependency>    <!--jstl-->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    
    <dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency> <!-- Java Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>    <!--log4j-->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
    </dependency>    <!--mybatis-->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.4.1</version>
    </dependency>    <!--mybatis逆向工程-->
    <dependency>
      <groupId>org.mybatis.generator</groupId>
      <artifactId>mybatis-generator-core</artifactId>
      <version>1.3.5</version>
    </dependency>    <!--mybatis spring整合包-->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>1.3.0</version>
    </dependency>    <!--hibernate 数据校验器包-->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>5.4.1.Final</version>
    </dependency>    <!--c3p0链接池-->
    <!-- <dependency>
      <groupId>com.mchange</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.5.2</version>
    </dependency> -->
    
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.0.2</version>
    </dependency>    <!--Mysql数据库驱动-->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.41</version>
    </dependency>
      <dependency>
          <groupId>org.jetbrains</groupId>
          <artifactId>annotations-java5</artifactId>
          <version>RELEASE</version>
      </dependency>  </dependencies>
  <build>
    <finalName>Examination_System</finalName>
    <!--在IDEA中maven 默认编译的时候   只搬运src/main/java里面的java文件到target/classes,其他文件会被忽略-->
    <!--这时,我们Mybatis的Mapper.xml文件就不能被加载进去,也就是不能映射成功-->
    <!--下面配置就能解决这个问题-->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.xml</include>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.xml</include>
        </includes>
      </resource>
    </resources>
    
    <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source> 
<target>1.8</target> 
</configuration>
</plugin>

<plugin>  
                <groupId>org.apache.tomcat.maven</groupId>  
                <artifactId>tomcat7-maven-plugin</artifactId>  
                <version>2.1</version>  
                <configuration>  
                    <port>9090</port>  
                    <path>/</path>  
                    <uriEncoding>UTF-8</uriEncoding>  
                    <finalName>Examination_System</finalName>  
                    <server>tomcat7</server>  
                </configuration>  
            </plugin>  

 </plugins>
    
  </build>
  
</project>

解决方案 »

  1.   

    我更改了版本以后没有在报错但是<context:component-scan base-package="cn.goodym.controller"/>这一行报错
    Multiple annotations found at this line:
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
    - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context.xsd', 
     because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
      

  2.   

    右键单击项目 -- Maven - update project 不行的话更改一下setting.xml配置文件 再update project
      

  3.   

    可以Run As test
    然后看报错信息有下载的包在本地的位置,找到那个下载不完全的包,删掉
    重新run as install一下试试
      

  4.   

    没下载好呗,你看下import包有没有报找不到
      

  5.   

    可能是你之前的maven包存在冲突了,找出来删掉,从新加载就行了
      

  6.   

    先去maven文件夹里面删掉然后重新install试试?我也是新手
      

  7.   

    1.在maven目录/conf/setting.xml修改源为阿里的源
    2.找到报错的是哪个包,去maven仓库检查,如果后缀是.lastPXXX,则将其全部删除。
    3.重新编译你的项目。
      

  8.   

    删掉本地仓库里面的jar包,重新import一次,或者直接在仓库里面看看能不能找到这个包,找不到就去私服看有没有,私服有的话就看settings是否有问题。私服有本地有就看版本对不对