diff --git a/inventory-ent/src/main/java/com/rzyc/config/SecurityConfig.java b/inventory-ent/src/main/java/com/rzyc/config/SecurityConfig.java index 5c7218a..89fee6f 100644 --- a/inventory-ent/src/main/java/com/rzyc/config/SecurityConfig.java +++ b/inventory-ent/src/main/java/com/rzyc/config/SecurityConfig.java @@ -69,8 +69,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { http .authorizeRequests() // 对于登录接口 允许匿名访问 - .antMatchers("/personal/login").anonymous() - .antMatchers("/personal/entlogin").anonymous() + .antMatchers("/personal/login","/personal/entlogin").permitAll() //放行swagger .antMatchers("/swagger-ui.html","/swagger-resources/**","/webjars/**","/v2/**","/api/**").permitAll() // 除上面外的所有请求全部需要鉴权认证,配置退出路径