diff --git a/auth/authentication-server/src/main/java/com/springboot/cloud/auth/authentication/service/impl/PopedomServiceImpl.java b/auth/authentication-server/src/main/java/com/springboot/cloud/auth/authentication/service/impl/PopedomServiceImpl.java index 416c3f5..1a3a50a 100644 --- a/auth/authentication-server/src/main/java/com/springboot/cloud/auth/authentication/service/impl/PopedomServiceImpl.java +++ b/auth/authentication-server/src/main/java/com/springboot/cloud/auth/authentication/service/impl/PopedomServiceImpl.java @@ -19,6 +19,14 @@ import javax.servlet.http.HttpServletRequest; import java.util.*; import java.util.stream.Collectors; +/** + * 处理资源数据,提高效率有三种方案: + * 1、内存储存处理 + * 2、redis存储处理 + * 3、直接调用服务 + * 第一种方案需要结合消息处理,每次增量读取新增的数据 + */ + @Service @Slf4j public class PopedomServiceImpl implements PopedomService { diff --git a/auth/authorization-server/src/main/java/com/springboot/auth/authorization/oauth2/enhancer/CustomTokenEnhancer.java b/auth/authorization-server/src/main/java/com/springboot/auth/authorization/oauth2/enhancer/CustomTokenEnhancer.java index 4b54e3b..8a7c88c 100644 --- a/auth/authorization-server/src/main/java/com/springboot/auth/authorization/oauth2/enhancer/CustomTokenEnhancer.java +++ b/auth/authorization-server/src/main/java/com/springboot/auth/authorization/oauth2/enhancer/CustomTokenEnhancer.java @@ -13,8 +13,12 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +/** + * 自定义传到前端的数据 + */ public class CustomTokenEnhancer implements TokenEnhancer { + // TODO: 2021-01-25 根据公司编号查询公司信息,在内存中进行 @Override public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { Map additionalInfo = Maps.newHashMap();