spring 2.0 与spring security 2.0.4集成来实现权限管理
配置文件如下:
     <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:security="http://www.springframework.org/schema/security"
             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-2.0.xsd
                                 http://www.springframework.org/schema/security 
                                 http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
     </beans>出现的错误如下:Line 7 in XML document from ServletContext resource [/WEB-INF/classes/applicationContext-                security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1:Cannot find the declaration of element 'beans'.我知道可能是版本的问题,可是网上的配置就是这样的 哪位高手能帮我看一下  弄了一个上午了都没有结果

解决方案 »

  1.   

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
    ">