您的位置:首页技术文章
文章详情页

spring security认证异常后返回中文提示的问题

【字号: 日期:2023-07-23 18:04:32浏览:2作者:猪猪

1.加载中文提示类

@Configurationpublic class ReloadMessageConfig { /** * 加载中文的认证提示信息 * * @return */ @Bean public ReloadableResourceBundleMessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); // .properties 不要加到后面 messageSource.setBasename('classpath:messages_zh_CN'); return messageSource; }

2.messages_zh_CN存放路径

spring security认证异常后返回中文提示的问题

3.messages_zh_CN文件

切记不要修改编码

AbstractAccessDecisionManager.accessDenied=u4E0Du5141u8BB8u8BBFu95EEAbstractLdapAuthenticationProvider.emptyPassword=u7528u6237u540Du6216u5BC6u7801u9519u8BEFAbstractSecurityInterceptor.authenticationNotFound=u672Au5728SecurityContextu4E2Du67E5u627Eu5230u8BA4u8BC1u5BF9u8C61AbstractUserDetailsAuthenticationProvider.badCredentials=u7528u6237u540Du6216u5BC6u7801u9519u8BEFAbstractUserDetailsAuthenticationProvider.credentialsExpired=u7528u6237u51EDu8BC1u5DF2u8FC7u671FAbstractUserDetailsAuthenticationProvider.disabled=u7528u6237u5DF2u5931u6548AbstractUserDetailsAuthenticationProvider.expired=u7528u6237u5E10u53F7u5DF2u8FC7u671FAbstractUserDetailsAuthenticationProvider.locked=u7528u6237u5E10u53F7u5DF2u88ABu9501u5B9AAbstractUserDetailsAuthenticationProvider.onlySupports=u4EC5u4EC5u652Fu6301UsernamePasswordAuthenticationTokenAccountStatusUserDetailsChecker.credentialsExpired=u7528u6237u51EDu8BC1u5DF2u8FC7u671FAccountStatusUserDetailsChecker.disabled=u7528u6237u5DF2u5931u6548AccountStatusUserDetailsChecker.expired=u7528u6237u5E10u53F7u5DF2u8FC7u671FAccountStatusUserDetailsChecker.locked=u7528u6237u5E10u53F7u5DF2u88ABu9501u5B9AAclEntryAfterInvocationProvider.noPermission=u7ED9u5B9Au7684Authenticationu5BF9u8C61({0})u6839u672Cu65E0u6743u64CDu63A7u9886u57DFu5BF9u8C61({1})AnonymousAuthenticationProvider.incorrectKey=u5C55u793Au7684AnonymousAuthenticationTokenu4E0Du542Bu6709u9884u671Fu7684keyBindAuthenticator.badCredentials=u7528u6237u540Du6216u5BC6u7801u9519u8BEFBindAuthenticator.emptyPassword=u7528u6237u540Du6216u5BC6u7801u9519u8BEFCasAuthenticationProvider.incorrectKey=u5C55u793Au7684CasAuthenticationTokenu4E0Du542Bu6709u9884u671Fu7684keyCasAuthenticationProvider.noServiceTicket=u672Au80FDu591Fu6B63u786Eu63D0u4F9Bu5F85u9A8Cu8BC1u7684CASu670Du52A1u7968u6839ConcurrentSessionControlAuthenticationStrategy.exceededAllowed=u5F53u524Du7528u6237u5DF2u7ECFu5728u53E6u5916u4E00u53F0u7535u8111u767Bu5F55u4E86uFF0Cu4E0Du5141u8BB8u91CDu590Du767Bu5F55DigestAuthenticationFilter.incorrectRealm=u54CDu5E94u7ED3u679Cu4E2Du7684Realmu540Du5B57({0})u540Cu7CFBu7EDFu6307u5B9Au7684Realmu540Du5B57({1})u4E0Du543Bu5408DigestAuthenticationFilter.incorrectResponse=u9519u8BEFu7684u54CDu5E94u7ED3u679CDigestAuthenticationFilter.missingAuth=u9057u6F0Fu4E86u9488u5BF9’auth’ QOPu7684u3001u5FC5u987Bu7ED9u5B9Au7684u6458u8981u53D6u503C; u63A5u6536u5230u7684u5934u4FE1u606Fu4E3A{0}DigestAuthenticationFilter.missingMandatory=u9057u6F0Fu4E86u5FC5u987Bu7ED9u5B9Au7684u6458u8981u53D6u503C; u63A5u6536u5230u7684u5934u4FE1u606Fu4E3A{0}DigestAuthenticationFilter.nonceCompromised=Nonceu4EE4u724Cu5DF2u7ECFu5B58u5728u95EEu9898u4E86uFF0C{0}DigestAuthenticationFilter.nonceEncoding=Nonceu672Au7ECFu8FC7Base64u7F16u7801; u76F8u5E94u7684nonceu53D6u503Cu4E3A {0}DigestAuthenticationFilter.nonceExpired=Nonceu5DF2u7ECFu8FC7u671F/u8D85u65F6DigestAuthenticationFilter.nonceNotNumeric=Nonceu4EE4u724Cu7684u7B2C1u90E8u5206u5E94u8BE5u662Fu6570u5B57uFF0Cu4F46u7ED3u679Cu5374u662F{0}DigestAuthenticationFilter.nonceNotTwoTokens=Nonceu5E94u8BE5u7531u4E24u90E8u5206u53D6u503Cu6784u6210uFF0Cu4F46u7ED3u679Cu5374u662F{0}DigestAuthenticationFilter.usernameNotFound=u7528u6237u540D{0}u672Au627Eu5230JdbcDaoImpl.noAuthority=u6CA1u6709u4E3Au7528u6237{0}u6307u5B9Au89D2u8272JdbcDaoImpl.notFound=u672Au627Eu5230u7528u6237{0}LdapAuthenticationProvider.badCredentials=u7528u6237u540Du6216u5BC6u7801u9519u8BEFLdapAuthenticationProvider.credentialsExpired=u7528u6237u51EDu8BC1u5DF2u8FC7u671FLdapAuthenticationProvider.disabled=u7528u6237u5DF2u5931u6548LdapAuthenticationProvider.expired=u7528u6237u5E10u53F7u5DF2u8FC7u671FLdapAuthenticationProvider.locked=u7528u6237u5E10u53F7u5DF2u88ABu9501u5B9ALdapAuthenticationProvider.emptyUsername=u7528u6237u540Du4E0Du5141u8BB8u4E3Au7A7ALdapAuthenticationProvider.onlySupports=u4EC5u4EC5u652Fu6301UsernamePasswordAuthenticationTokenPasswordComparisonAuthenticator.badCredentials=u7528u6237u540Du6216u5BC6u7801u9519u8BEF#PersistentTokenBasedRememberMeServices.cookieStolen=Invalid remember-me token (Series/token) mismatch. Implies previous cookie theft attack.ProviderManager.providerNotFound=u672Au67E5u627Eu5230u9488u5BF9{0}u7684AuthenticationProviderRememberMeAuthenticationProvider.incorrectKey=u5C55u793ARememberMeAuthenticationTokenu4E0Du542Bu6709u9884u671Fu7684keyRunAsImplAuthenticationProvider.incorrectKey=u5C55u793Au7684RunAsUserTokenu4E0Du542Bu6709u9884u671Fu7684keySubjectDnX509PrincipalExtractor.noMatching=u672Au5728subjectDN: {0}u4E2Du627Eu5230u5339u914Du7684u6A21u5F0FSwitchUserFilter.noCurrentUser=u4E0Du5B58u5728u5F53u524Du7528u6237SwitchUserFilter.noOriginalAuthentication=u4E0Du80FDu591Fu67E5u627Eu5230u539Fu5148u7684u5DF2u8BA4u8BC1u5BF9u8C61

spring security认证异常后返回中文提示的问题

到此这篇关于spring security认证异常后返回中文提示的问题的文章就介绍到这了,更多相关spring security认证异常内容请搜索好吧啦网以前的文章或继续浏览下面的相关文章希望大家以后多多支持好吧啦网!

标签: Spring
相关文章: