diff --git a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java index 2fff7b1..4c58b45 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java +++ b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java @@ -72,7 +72,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/swagger-ui/**", "/webjars/**", "/websocket/**", - "/captcha").anonymous() + "/captcha", + "druid/**").anonymous() // .antMatchers("/testCors").hasAuthority("system:dept:list222") // 除上面外的所有请求全部需要鉴权认证 .anyRequest() diff --git a/ym-admin/src/main/java/com/cnbm/admin/entity/LoginUser.java b/ym-admin/src/main/java/com/cnbm/admin/entity/LoginUser.java index 6729ecd..21569dd 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/entity/LoginUser.java +++ b/ym-admin/src/main/java/com/cnbm/admin/entity/LoginUser.java @@ -1,16 +1,19 @@ package com.cnbm.admin.entity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; -import lombok.NoArgsConstructor; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import lombok.Data; +import lombok.NoArgsConstructor; /** * @Author weihongyang @@ -20,7 +23,9 @@ import java.util.stream.Collectors; @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class LoginUser implements UserDetails { +public class LoginUser implements UserDetails,Serializable { + + private static final long serialVersionUID = 1L; private SysUserEntity sysUserEntity;