Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 发现以元素';开头的内容无效;bean:http';_Xml_Spring_Hibernate_Security_Spring Mvc - Fatal编程技术网

Xml 发现以元素';开头的内容无效;bean:http';

Xml 发现以元素';开头的内容无效;bean:http';,xml,spring,hibernate,security,spring-mvc,Xml,Spring,Hibernate,Security,Spring Mvc,我的spring-security.xml文件有问题 <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.o

我的spring-security.xml文件有问题

<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
                    http://www.springframework.org/schema/jdbc
                    http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
                    http://www.springframework.org/schema/security
                    http://www.springframework.org/schema/security/spring-security-3.2.xsd">

<beans:http auto-config="true" use-expressions="true">
    <beans:intercept-url pattern="/admin**" access="hasRole('ROLE_ADMIN')" />
    <beans:intercept-url pattern="/user**" access="hasRole('ROLE_USER')" /><!-- 
        access denied page -->
    <beans:access-denied-handler error-page="/403" />
    <beans:form-login login-page="/login" authentication-failure-url="/login?error"
        username-parameter="username" password-parameter="password" />
    <beans:logout logout-success-url="/login?logout" /><!-- enable csrf protection -->
    <beans:csrf />
</beans:http>
<beans:authentication-manager>
    <beans:authentication-provider user-service-ref="loginService" />
</beans:authentication-manager>

这里有一个错误

cvc复杂类型.2.4.a:发现以元素“beans:http”开头的内容无效。其中一个…(我不能发布超过2个链接)是预期的

什么问题?请帮忙

删除

<http auto-config="true" use-expressions="true">
    <intercept-url pattern="/admin**" access="hasRole('ROLE_ADMIN')" />
    <intercept-url pattern="/user**" access="hasRole('ROLE_USER')" /><!-- 
        access denied page -->
    <access-denied-handler error-page="/403" />
    <form-login login-page="/login" authentication-failure-url="/login?error"
        username-parameter="username" password-parameter="password" />
    <logout logout-success-url="/login?logout" /><!-- enable csrf protection -->
    <csrf />
</http>
<authentication-manager>
    <authentication-provider user-service-ref="loginService" />
</authentication-manager>