毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> java技术 >> 正文

Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#1'

更新时间:2016-3-27:  来源:毕业论文

Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#1' while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#1': Cannot resolve reference to bean 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' while setting constructor argument with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/authentication/InternalAuthenticationServiceException

src下的securityConfig.xml文件
 
 
<?xml version="1.0" encoding="UTF-8"?>
<b:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:b="http://www.springframework.org/schema/beans" 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-3.0.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
 
    <!--登录页面不过滤 -->
    <http pattern="/login.jsp" security="none" />
    
    <http access-denied-page="/accessDenied.jsp">
        <form-login login-page="/login.jsp" />
        <!--访问/admin.jsp资源的用户必须具有ROLE_ADMIN的权限 -->
        <intercept-url pattern="/admin.jsp" access="ROLE_ADMIN" />
        <!--访问/**资源的用户必须具有ROLE_USER的权限 -->
        <intercept-url pattern="/**" access="ROLE_USER" />
        <session-management>
            <concurrency-control max-sessions="1" error-if-maximum-exceeded="false" />
        </session-management>
    </http>
    
    <authentication-manager>
        <authentication-provider>
            <user-service>
                <user name="john" password="john" authorities="ROLE_USER" />
                <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" />
                <user name="guest" password="guest" authorities="ROLE_GUEST" />
            </user-service>
        </authentication-provider>
    </authentication-manager>
</b:beans>
是加上use-expressions="true"这个意思是 使用spring的SpEL表达式出错的.但是不清楚为什么加上这一个属性就会出错呢?

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。