springMVC框架 springmvc-config.xml文件 导入beans、context、mvc命名空间后报错:xml页面开头报错Multiple annotations found at this line

根据网上给出的解决方案,可以解决

1、调出MyEclipse的preference,按照如下图示配置

2、配置好之后,就可以在springmvc-congig.xml文件中引入如下命名空间了

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http2、://www.springframework.org/schema/mvc"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-3.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

猜你喜欢

转载自www.cnblogs.com/rommel0618/p/9502986.html