spring security xml authentication-manager错误

时间:2015-12-30 16:21:55

标签: xml spring-security

<?xml version="1.0" encoding="UTF-8"?>

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

    <http auto-config="true">
        <intercept-url pattern="/**" access="ROLE_USER" />
    </http>

    <authentication-manager alias="dfg">
        <authentication-provider>
            <jdbc-user-service data-source-ref="datasource"/>
        </authentication-provider>
    </authentication-manager>

    <beans:bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <beans:property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <beans:property name="url" value="jdbc:mysql://localhost:3306/spring_security"/>
        <beans:property name="username" value="root"/>
        <beans:property name="password" value="password"/>
    </beans:bean>


</beans:beans>`

这个&#39;身份验证管理员&#39;标签显示我在intellij idea 14中的错误,说明元素&#39;身份验证管理器&#39;必须没有字符或元素信息项[子项],因为类型的内容类型为空

0 个答案:

没有答案