这是我在控制台中遇到的HQL查询。我在登录时收到“ org.springframework.security.authentication.BadCredentialsException”。登录时我使用了正确的凭据。我是HQL查询语言的新手。需要帮助谢谢

--- HQL AST ---
     \-[QUERY] Node: 'query'
        +-[SELECT_FROM] Node: 'SELECT_FROM'
        |  +-[FROM] Node: 'from'
        |  |  \-[RANGE] Node: 'RANGE'
        |  |     +-[DOT] Node: '.'
        |  |     |  +-[DOT] Node: '.'
        |  |     |  |  +-[DOT] Node: '.'
        |  |     |  |  |  +-[DOT] Node: '.'
        |  |     |  |  |  |  +-[IDENT] Node: 'com'
        |  |     |  |  |  |  \-[IDENT] Node: 'mindfiresolutions'
        |  |     |  |  |  \-[IDENT] Node: 'springmaven'
        |  |     |  |  \-[IDENT] Node: 'models'
        |  |     |  \-[IDENT] Node: 'Employee'
        |  |     \-[ALIAS] Node: 'generatedAlias0'
        |  \-[SELECT] Node: 'select'
        |     \-[IDENT] Node: 'generatedAlias0'
        \-[WHERE] Node: 'where'
           \-[EQ] Node: '='
              +-[DOT] Node: '.'
              |  +-[IDENT] Node: 'generatedAlias0'
              |  \-[IDENT] Node: 'employeeUserName'
              \-[COLON] Node: ':'
                 \-[IDENT] Node: 'param0'

最佳答案

问题可能恰恰是听起来很像,您使用了错误的凭据进行连接。在不了解有关您的应用程序(类型或运行方式)的情况下,很难确切知道,但是我建议您查看一下您的连接配置,以确保一切都应该正确。

来自api:BadCredentialsException为“如果由于凭据无效而拒绝身份验证请求,则抛出该异常。要抛出此异常,则意味着该帐户既未锁定也未禁用。”

https://docs.spring.io/spring-security/site/docs/current/apidocs/org/springframework/security/authentication/BadCredentialsException.html

09-06 22:13