Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hphy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向怀芳
hphy
Commits
4cf1983e
Commit
4cf1983e
authored
Oct 21, 2022
by
向怀芳
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 国际化
parent
434ce2ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
ReloadMessageConfig.java
...ict/cloud/common/security/config/ReloadMessageConfig.java
+3
-0
spring.factories
...mon-security/src/main/resources/META-INF/spring.factories
+1
-0
messages.properties
...-security/src/main/resources/security/messages.properties
+47
-0
No files found.
cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/config/ReloadMessageConfig.java
View file @
4cf1983e
...
...
@@ -4,12 +4,15 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.support.ReloadableResourceBundleMessageSource
;
import
java.util.Locale
;
//security中文提示信息配置类
@Configuration
public
class
ReloadMessageConfig
{
@Bean
//加载中文认证提示信息
public
ReloadableResourceBundleMessageSource
messageSource
(){
Locale
.
setDefault
(
Locale
.
SIMPLIFIED_CHINESE
);
ReloadableResourceBundleMessageSource
messageSource
=
new
ReloadableResourceBundleMessageSource
();
//加载org/springframework/security包下的中文提示信息 配置文件
messageSource
.
setBasename
(
"classpath:security/messages_zh_CN"
);
...
...
cloud-common/cloud-common-security/src/main/resources/META-INF/spring.factories
View file @
4cf1983e
...
...
@@ -2,6 +2,7 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.openfeign.SictHystrixFeignTargeterConfiguration,\
cn.sh.stc.sict.cloud.common.security.feign.SictFeignConfiguration,\
cn.sh.stc.sict.cloud.common.security.config.UserAccountProperties,\
cn.sh.stc.sict.cloud.common.security.config.ReloadMessageConfig,\
cn.sh.stc.sict.cloud.common.security.service.SictUserDetailsServiceImpl,\
cn.sh.stc.sict.cloud.common.security.component.SictWebResponseExceptionTranslator,\
cn.sh.stc.sict.cloud.common.security.component.ResourceAuthExceptionEntryPoint,\
...
...
cloud-common/cloud-common-security/src/main/resources/security/messages.properties
0 → 100644
View file @
4cf1983e
AbstractAccessDecisionManager.accessDenied
=
Access is denied
AbstractLdapAuthenticationProvider.emptyPassword
=
Empty Password
AbstractSecurityInterceptor.authenticationNotFound
=
An Authentication object was not found in the SecurityContext
AbstractUserDetailsAuthenticationProvider.badCredentials
=
Bad credentials
AbstractUserDetailsAuthenticationProvider.credentialsExpired
=
User credentials have expired
AbstractUserDetailsAuthenticationProvider.disabled
=
User is disabled
AbstractUserDetailsAuthenticationProvider.expired
=
User account has expired
AbstractUserDetailsAuthenticationProvider.locked
=
User account is locked
AbstractUserDetailsAuthenticationProvider.onlySupports
=
Only UsernamePasswordAuthenticationToken is supported
AccountStatusUserDetailsChecker.credentialsExpired
=
User credentials have expired
AccountStatusUserDetailsChecker.disabled
=
User is disabled
AccountStatusUserDetailsChecker.expired
=
User account has expired
AccountStatusUserDetailsChecker.locked
=
User account is locked
AclEntryAfterInvocationProvider.noPermission
=
Authentication {0} has NO permissions to the domain object {1}
AnonymousAuthenticationProvider.incorrectKey
=
The presented AnonymousAuthenticationToken does not contain the expected key
BindAuthenticator.badCredentials
=
Bad credentials
BindAuthenticator.emptyPassword
=
Empty Password
CasAuthenticationProvider.incorrectKey
=
The presented CasAuthenticationToken does not contain the expected key
CasAuthenticationProvider.noServiceTicket
=
Failed to provide a CAS service ticket to validate
ConcurrentSessionControlAuthenticationStrategy.exceededAllowed
=
Maximum sessions of {0} for this principal exceeded
DigestAuthenticationFilter.incorrectRealm
=
Response realm name {0} does not match system realm name of {1}
DigestAuthenticationFilter.incorrectResponse
=
Incorrect response
DigestAuthenticationFilter.missingAuth
=
Missing mandatory digest value for 'auth' QOP; received header {0}
DigestAuthenticationFilter.missingMandatory
=
Missing mandatory digest value; received header {0}
DigestAuthenticationFilter.nonceCompromised
=
Nonce token compromised {0}
DigestAuthenticationFilter.nonceEncoding
=
Nonce is not encoded in Base64; received nonce {0}
DigestAuthenticationFilter.nonceExpired
=
Nonce has expired/timed out
DigestAuthenticationFilter.nonceNotNumeric
=
Nonce token should have yielded a numeric first token, but was {0}
DigestAuthenticationFilter.nonceNotTwoTokens
=
Nonce should have yielded two tokens but was {0}
DigestAuthenticationFilter.usernameNotFound
=
Username {0} not found
JdbcDaoImpl.noAuthority
=
User {0} has no GrantedAuthority
JdbcDaoImpl.notFound
=
User {0} not found
LdapAuthenticationProvider.badCredentials
=
Bad credentials
LdapAuthenticationProvider.credentialsExpired
=
User credentials have expired
LdapAuthenticationProvider.disabled
=
User is disabled
LdapAuthenticationProvider.expired
=
User account has expired
LdapAuthenticationProvider.locked
=
User account is locked
LdapAuthenticationProvider.emptyUsername
=
Empty username not allowed
LdapAuthenticationProvider.onlySupports
=
Only UsernamePasswordAuthenticationToken is supported
PasswordComparisonAuthenticator.badCredentials
=
Bad credentials
PersistentTokenBasedRememberMeServices.cookieStolen
=
Invalid remember-me token (Series/token) mismatch. Implies previous cookie theft attack.
ProviderManager.providerNotFound
=
No AuthenticationProvider found for {0}
RememberMeAuthenticationProvider.incorrectKey
=
The presented RememberMeAuthenticationToken does not contain the expected key
RunAsImplAuthenticationProvider.incorrectKey
=
The presented RunAsUserToken does not contain the expected key
SubjectDnX509PrincipalExtractor.noMatching
=
No matching pattern was found in subjectDN: {0}
SwitchUserFilter.noCurrentUser
=
No current user associated with this request
SwitchUserFilter.noOriginalAuthentication
=
Could not find original Authentication object
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment