社区
Web 开发
帖子详情
j_spring_security_check,出现404错误是怎么回事啊?
hhh_zzz
2013-05-06 05:05:33
j_spring_security_check,出现404错误是怎么回事啊?
...全文
487
8
打赏
收藏
j_spring_security_check,出现404错误是怎么回事啊?
j_spring_security_check,出现404错误是怎么回事啊?
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
小丑哥_V5
2013-05-10
打赏
举报
回复
引用 楼主 hhh_zzz 的回复:
j_spring_security_check,出现404错误是怎么回事啊?
请看我的博客开源项目,是基于spring,security开发的 http://blog.csdn.net/shadowsick
hhh_zzz
2013-05-07
打赏
举报
回复
我看了下没有得到解决办法,你能直接给我讲下什么原因吗,是不是还有哪里配置不正确。
小丑哥_V5
2013-05-06
打赏
举报
回复
spring security3的问题可以参考下我博客里的文章
hhh_zzz
2013-05-06
打赏
举报
回复
急啊,怎么都没人回了。
hhh_zzz
2013-05-06
打赏
举报
回复
<?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" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <beans:property name="driverClassName" value="org.gjt.mm.mysql.Driver"/> <beans:property name="url" value="jdbc:mysql://localhost:3306/test? useUnicode=true&characterEncoding=UTF-8"/> <beans:property name="username" value="root"/> <beans:property name="password" value="admin"/> </beans:bean> <!-- 配置SpringSecurity的http安全服务 --> <http auto-config="false"> <!--<form-login login-page="/login.jsp" login-processing-url="/login" /> --> <!-- 只有ROLE_ADMIN或ROLE_USER权限用户才能访问index.jsp --> <intercept-url pattern="/index.jsp" access="ROLE_ADMIN,ROLE_USER"/> <!-- 只有ROLE_ADMIN权限用户才能访问admin.jsp --> <intercept-url pattern="/admin.jsp" access="ROLE_ADMIN"/> <form-login login-page="/login.jsp" login-processing-url="/login" default-target-url="/index.jsp" authentication-failure-url="/loginfail.jsp" always-use-default-target="true"/> <logout logout-url="/logout" logout-success-url="/bye.jsp" invalidate-session="true" /> </http> <authentication-manager> <authentication-provider> <!--<user-service> <user password="admin" name="admin" authorities="ROLE_ADMIN"/> <user password="user" name="user" authorities="ROLE_USER"/> </user-service>--> <jdbc-user-service data-source-ref="dataSource" users-by-username-query="select username,password,disabled from user where username = ? and disabled=1" authorities-by-username-query="select u.username,r.name from user u join user_role ur on u.id = ur.user_id join role r on r.id = ur.role_id where u.username = ?" /> </authentication-provider> </authentication-manager> </beans:beans>
tianma630
2013-05-06
打赏
举报
回复
配置文件发出来看看 一般都是跳转的路径有问题
hhh_zzz
2013-05-06
打赏
举报
回复
不是,登陆成功后跳转出错; <body> <form action="<%=request.getContextPath()%>/j_spring_security_check" method="post"> <table> <tr> <td>User:</td> <td><input type="text" id="username" name="j_username" value="${SPRING_SECURITY_LAST_USERNAME}"/></td> </tr> <tr> <td>Password:</td> <td><input type="password" id="password" name="j_password" value=""></td> </tr> <tr> <td clospan='2'><input name="submit" type="submit"></td> </tr> <tr> <td clospan='2'><input name="reset" type="reset"></td> </tr> </table> </form> </body>
lvzg_005
2013-05-06
打赏
举报
回复
spring_security 没有正常加载,出错了
j_
spring
_
security
_
check
404
本文记录了一次使用
Spring
Security
搭建权限管理框架过程中遇到的
404错误
排查经历。问题在于<filter>和<filter-mapping>标签的配置不当,最终通过调整标签位置解决了该问题。
Spring
j_
spring
_
security
_
check
报
404错误
本文探讨了
Spring
Security
中j_
spring
_
security
_
check
出现
404错误
的原因及解决办法。主要从
spring
-
security
.xml配置文件中的processing-url设置与formlogin时默认namespace的影响两方面进行分析。
j_
spring
_
security
_
check
404错误
本文记录了作者在配置
Spring
Security
过程中遇到的问题及解决方法,重点分析了<intercept-url pattern=/* filters=none/>导致的问题,并分享了排查过程与解决方案。
spring
security
4 cas4 整合 j_
spring
_cas_
security
_
check
404
本文介绍在集成CAS4与
Spring
Security
4时遇到的j_
spring
_cas_
security
_
check
404错误
及其解决方案。通过调整ServiceProperties配置中的service URL,可以有效避免该问题。
Spring
Security
3.13 Login Error : HTTP Status 404 - /j_
spring
_
security
_
check
本文介绍了一种解决
Spring
Security
框架中
出现
的HTTPStatus404-/j_
spring
_
security
_
check
错误的方法。通过正确设置JSP页面中的form表单action属性指向${loginUrl}
Web 开发
81,108
社区成员
341,721
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章