zoukankan      html  css  js  c++  java
  • Spring常见问题解决办法汇总

    解决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
  • 相关阅读:
    怎么保存退出vi编辑
    rpmlib(PayloadIsLzma) <= 4.4.6-1 is needed【转载】
    自制rpm包
    程序员应该具备的十个代码习惯
    面试时可以问的问题
    Git教程(二)-如何上传和同步自己的git项目
    Git教程及问题解析
    HTML5调用百度地图API进行地理定位实例
    PHP基于单例模式编写PDO类的方法
    PHP输出缓存ob系列函数详解
  • 原文地址:https://www.cnblogs.com/softidea/p/4458817.html
Copyright © 2011-2022 走看看