重定向到 authentication-failure-url 即使细节是正确的,在 spring security unix

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!!! Creating emergency threads for unassigned pending tasks!"。错误。 现在它只是重定向到错误页面,即使用户详细信息是正确的。

MYSQL安装有问题。

在我的认证管理器中---->users-by-username-query,

table 名称是大写字母,在我的开发机器中 mysql 接受 table 名称而不看大小写,但在生产中同样失败。

IN linux 默认情况下 MYSQL table 名称区分大小写。 因此,请检查您是否正在使用 windows 作为开发机器和生产机器作为 LINUX。