[英]redirecting to authentication-failure-url even details are correct, in spring security unix
您好以下是我的springsecurity.xml
<authentication-manager>
<authentication-provider>
<!--<user-service>-->
<!--<user name="admin" password="secret" authorities="ROLE_ADMIN,ROLE_USER" />-->
<!--<user name="user1" password="1111" authorities="ROLE_USER" />-->
<!--</user-service>-->
<jdbc-user-service data-source-ref="dataSource"
users-by-username-query="select username,password, 'true' as enabled from USER_DETAILS where username=?"
authorities-by-username-query="select USER_DETAILS.username , USER_AUTH.AUTHORITY as authorities from USER_DETAILS,USER_AUTH
where USER_DETAILS.username = ? AND USER_DETAILS.username=USER_AUTH.USERNAME "/>
</authentication-provider>
</authentication-manager>
以下是数据源的详细信息
login.jdbc.driver=com.mysql.jdbc.Driver
login.url=jdbc:mysql://localhost:3306/DBNAME?autoReconnect=true
login.username=xxxxxxxx
login.password=xxxxxxxx
##c3p0 configurations
login.c3p0.acquireIncrement=5
login.c3p0.idleConnectionTestPeriod=6000
login.c3p0.maxPoolSize=30
login.c3p0.maxStatements=0
login.c3p0.minPoolSize=10
login.c3p0.initialPoolSize=10
login.c3p0.maxIdleTime=0
login.c3p0.acquireRetryAttempts=3
login.c3p0.acquireRetryDelay=20000
login.c3p0.breakAfterAcquireFailure=false
在我的开发机器上也是如此,当它移至生产版时,登录机制失败了。 一段时间以前,它给出了“ APPARENT DEADLOCK !!!!!!!为未分配的待处理任务创建紧急线程!”。 错误。 现在,即使用户详细信息正确,它也只是重定向到错误页面。
MYSQL安装有问题。
在我的身份验证管理器中->按用户名查询用户,
表名用大写字母表示,在我的开发机mysql中,表名不区分大小写,但在生产中却失败了。
默认情况下,在Linux中,MYSQL表名区分大小写。 因此,请检查您是否正在将Windows作为DEV和将Production机器作为LINUX使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.