springSecurity问题 知道的大哥帮忙解决下 谢谢了

mrs_xin 2010-08-24 10:39:52
tomcat启动出错: No bean named 'springSecurityFilterChain' is defined 问题
applicationContext-security.xml 配置如下!
<?xml version="1.0" encoding="UTF-8"?>
<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"
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.1.xsd">
<beans:bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver" />
<beans:property name="url" value="jdbc.oracle.thin:@localhost:1521:ORCL" />
<beans:property name="username" value="scott" />
<beans:property name="password" value="tiger" />
</beans:bean>
<!-- 自动装配 -->
<http auto-config="true">
<intercept-url pattern="/admin.jsp" access="ROLE_ADMIN" />
<intercept-url pattern="/**" access="ROLE_USER" />
</http>

<http auto-config='true'></http>
<authentication-provider>
<jdbc-user-service data-source-ref="dataSource" />
</authentication-provider>
</beans:beans>
web.xml配置:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/applicationContext*.xml
/WEB-INF/applicationContext*.xml
</param-value>
</context-param>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
...全文
61 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sotom 2010-08-25
  • 打赏
  • 举报
回复
springSecurityFilterChain 没找到这个bean , 看下类路径, 或者这个类配置没配置进来
生活 2010-08-25
  • 打赏
  • 举报
回复
结贴率 0 。。。。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧