修改hashmap 初始化值

This commit is contained in:
yihur 2019-10-11 17:01:24 +08:00
parent cb5453cd53
commit 59252636e1
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
@Bean
public TokenEnhancer tokenEnhancer() {
return (accessToken, authentication) -> {
final Map<String, Object> additionalInfo = new HashMap<>(1);
final Map<String, Object> additionalInfo = new HashMap<>(4);
PigUser pigUser = (PigUser) authentication.getUserAuthentication().getPrincipal();
additionalInfo.put(SecurityConstants.DETAILS_LICENSE, SecurityConstants.PROJECT_LICENSE);
additionalInfo.put(SecurityConstants.DETAILS_USER_ID, pigUser.getId());