码迷,mamicode.com
首页 > 编程语言 > 详细

Spring常见问题解决办法汇总

时间:2015-04-27 01:54:05      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:

 

解决The prefix ‘context‘ for element ‘context:component-scan‘ is not bound
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop
          http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

</beans>

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

 

http://www.cnblogs.com/pipicoming/archive/2013/12/16/3476235.html

No grammar constraints (DTD or XML schema).....两种解决方法
方法一:常用方法   关闭XML验证
工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。
 
方法二:(个人推荐)
添加 内容如下
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd">
http://blog.csdn.net/xwin1989/article/details/6754790
http://blog.sina.com.cn/s/blog_6b8f1feb01010y5a.html

cvc-complex-type.2.4.a: Invalid content was found starting with element ‘para-names‘. One of ‘{"http://
 java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":param-name}‘ is
 expected.
解决办法:
将web.xml中

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

替换为

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

 

Spring常见问题解决办法汇总

标签:

原文地址:http://www.cnblogs.com/softidea/p/4458817.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!