|
@@ -22,7 +22,7 @@ import org.springframework.web.filter.CorsFilter;
|
|
|
|
|
|
/**
|
|
|
* spring security配置
|
|
|
- *
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
|
@@ -33,7 +33,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|
|
*/
|
|
|
@Autowired
|
|
|
private UserDetailsService userDetailsService;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 认证失败处理类
|
|
|
*/
|
|
@@ -51,7 +51,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|
|
*/
|
|
|
@Autowired
|
|
|
private JwtAuthenticationTokenFilter authenticationTokenFilter;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 跨域过滤器
|
|
|
*/
|
|
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|
|
// 过滤请求
|
|
|
.authorizeRequests()
|
|
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
|
|
- .antMatchers("/login", "/register").permitAll()
|
|
|
+ .antMatchers("/login", "/register","/test/**").permitAll()
|
|
|
// 静态资源,可匿名访问
|
|
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
|
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|