Set<GrantedAuthority> grantedAuths = new HashSet<GrantedAuthority>();
List<Role> roles = userMapper.selectRolsByUserId(userOne.getTid());
if (!ObjectUtils.isEmpty(roles)) {
grantedAuths.addAll(Lists.transform(roles, (Function<Role, GrantedAuthority>) role -> new SimpleGrantedAuthority("ROLE_" + role.getRoleName())));
}
@Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer());
}
PREVIOUSMark web site
NEXT快速开始