服务器之家:专注于服务器技术及软件下载分享
分类导航

PHP教程|ASP.NET教程|Java教程|ASP教程|编程技术|正则表达式|C/C++|IOS|C#|Swift|Android|VB|R语言|JavaScript|易语言|vb.net|

服务器之家 - 编程语言 - Java教程 - spring security认证异常后返回中文提示的问题

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

2021-08-04 09:54小黄鸡1992 Java教程

这篇文章主要介绍了spring security认证异常后返回中文提示的问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

1.加载中文提示类

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@configuration
public 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文件

切记不要修改编码

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
abstractaccessdecisionmanager.accessdenied=\u4e0d\u5141\u8bb8\u8bbf\u95ee
abstractldapauthenticationprovider.emptypassword=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
abstractsecurityinterceptor.authenticationnotfound=\u672a\u5728securitycontext\u4e2d\u67e5\u627e\u5230\u8ba4\u8bc1\u5bf9\u8c61
abstractuserdetailsauthenticationprovider.badcredentials=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
abstractuserdetailsauthenticationprovider.credentialsexpired=\u7528\u6237\u51ed\u8bc1\u5df2\u8fc7\u671f
abstractuserdetailsauthenticationprovider.disabled=\u7528\u6237\u5df2\u5931\u6548
abstractuserdetailsauthenticationprovider.expired=\u7528\u6237\u5e10\u53f7\u5df2\u8fc7\u671f
abstractuserdetailsauthenticationprovider.locked=\u7528\u6237\u5e10\u53f7\u5df2\u88ab\u9501\u5b9a
abstractuserdetailsauthenticationprovider.onlysupports=\u4ec5\u4ec5\u652f\u6301usernamepasswordauthenticationtoken
accountstatususerdetailschecker.credentialsexpired=\u7528\u6237\u51ed\u8bc1\u5df2\u8fc7\u671f
accountstatususerdetailschecker.disabled=\u7528\u6237\u5df2\u5931\u6548
accountstatususerdetailschecker.expired=\u7528\u6237\u5e10\u53f7\u5df2\u8fc7\u671f
accountstatususerdetailschecker.locked=\u7528\u6237\u5e10\u53f7\u5df2\u88ab\u9501\u5b9a
aclentryafterinvocationprovider.nopermission=\u7ed9\u5b9a\u7684authentication\u5bf9\u8c61({0})\u6839\u672c\u65e0\u6743\u64cd\u63a7\u9886\u57df\u5bf9\u8c61({1})
anonymousauthenticationprovider.incorrectkey=\u5c55\u793a\u7684anonymousauthenticationtoken\u4e0d\u542b\u6709\u9884\u671f\u7684key
bindauthenticator.badcredentials=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
bindauthenticator.emptypassword=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
casauthenticationprovider.incorrectkey=\u5c55\u793a\u7684casauthenticationtoken\u4e0d\u542b\u6709\u9884\u671f\u7684key
casauthenticationprovider.noserviceticket=\u672a\u80fd\u591f\u6b63\u786e\u63d0\u4f9b\u5f85\u9a8c\u8bc1\u7684cas\u670d\u52a1\u7968\u6839
concurrentsessioncontrolauthenticationstrategy.exceededallowed=\u5f53\u524d\u7528\u6237\u5df2\u7ecf\u5728\u53e6\u5916\u4e00\u53f0\u7535\u8111\u767b\u5f55\u4e86\uff0c\u4e0d\u5141\u8bb8\u91cd\u590d\u767b\u5f55
digestauthenticationfilter.incorrectrealm=\u54cd\u5e94\u7ed3\u679c\u4e2d\u7684realm\u540d\u5b57({0})\u540c\u7cfb\u7edf\u6307\u5b9a\u7684realm\u540d\u5b57({1})\u4e0d\u543b\u5408
digestauthenticationfilter.incorrectresponse=\u9519\u8bef\u7684\u54cd\u5e94\u7ed3\u679c
digestauthenticationfilter.missingauth=\u9057\u6f0f\u4e86\u9488\u5bf9'auth' qop\u7684\u3001\u5fc5\u987b\u7ed9\u5b9a\u7684\u6458\u8981\u53d6\u503c; \u63a5\u6536\u5230\u7684\u5934\u4fe1\u606f\u4e3a{0}
digestauthenticationfilter.missingmandatory=\u9057\u6f0f\u4e86\u5fc5\u987b\u7ed9\u5b9a\u7684\u6458\u8981\u53d6\u503c; \u63a5\u6536\u5230\u7684\u5934\u4fe1\u606f\u4e3a{0}
digestauthenticationfilter.noncecompromised=nonce\u4ee4\u724c\u5df2\u7ecf\u5b58\u5728\u95ee\u9898\u4e86\uff0c{0}
digestauthenticationfilter.nonceencoding=nonce\u672a\u7ecf\u8fc7base64\u7f16\u7801; \u76f8\u5e94\u7684nonce\u53d6\u503c\u4e3a {0}
digestauthenticationfilter.nonceexpired=nonce\u5df2\u7ecf\u8fc7\u671f/\u8d85\u65f6
digestauthenticationfilter.noncenotnumeric=nonce\u4ee4\u724c\u7684\u7b2c1\u90e8\u5206\u5e94\u8be5\u662f\u6570\u5b57\uff0c\u4f46\u7ed3\u679c\u5374\u662f{0}
digestauthenticationfilter.noncenottwotokens=nonce\u5e94\u8be5\u7531\u4e24\u90e8\u5206\u53d6\u503c\u6784\u6210\uff0c\u4f46\u7ed3\u679c\u5374\u662f{0}
digestauthenticationfilter.usernamenotfound=\u7528\u6237\u540d{0}\u672a\u627e\u5230
jdbcdaoimpl.noauthority=\u6ca1\u6709\u4e3a\u7528\u6237{0}\u6307\u5b9a\u89d2\u8272
jdbcdaoimpl.notfound=\u672a\u627e\u5230\u7528\u6237{0}
ldapauthenticationprovider.badcredentials=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
ldapauthenticationprovider.credentialsexpired=\u7528\u6237\u51ed\u8bc1\u5df2\u8fc7\u671f
ldapauthenticationprovider.disabled=\u7528\u6237\u5df2\u5931\u6548
ldapauthenticationprovider.expired=\u7528\u6237\u5e10\u53f7\u5df2\u8fc7\u671f
ldapauthenticationprovider.locked=\u7528\u6237\u5e10\u53f7\u5df2\u88ab\u9501\u5b9a
ldapauthenticationprovider.emptyusername=\u7528\u6237\u540d\u4e0d\u5141\u8bb8\u4e3a\u7a7a
ldapauthenticationprovider.onlysupports=\u4ec5\u4ec5\u652f\u6301usernamepasswordauthenticationtoken
passwordcomparisonauthenticator.badcredentials=\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef
#persistenttokenbasedremembermeservices.cookiestolen=invalid remember-me token (series/token) mismatch. implies previous cookie theft attack.
providermanager.providernotfound=\u672a\u67e5\u627e\u5230\u9488\u5bf9{0}\u7684authenticationprovider
remembermeauthenticationprovider.incorrectkey=\u5c55\u793aremembermeauthenticationtoken\u4e0d\u542b\u6709\u9884\u671f\u7684key
runasimplauthenticationprovider.incorrectkey=\u5c55\u793a\u7684runasusertoken\u4e0d\u542b\u6709\u9884\u671f\u7684key
subjectdnx509principalextractor.nomatching=\u672a\u5728subjectdn\: {0}\u4e2d\u627e\u5230\u5339\u914d\u7684\u6a21\u5f0f
switchuserfilter.nocurrentuser=\u4e0d\u5b58\u5728\u5f53\u524d\u7528\u6237
switchuserfilter.nooriginalauthentication=\u4e0d\u80fd\u591f\u67e5\u627e\u5230\u539f\u5148\u7684\u5df2\u8ba4\u8bc1\u5bf9\u8c61

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

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

原文链接:https://blog.csdn.net/qq_20143059/article/details/113607978

延伸 · 阅读

精彩推荐