2025年5月8日10:10:43

main
liuao 2 weeks ago
parent fe544b6c92
commit cbe5fa4423
  1. 4
      src/main/java/com/zilber/boot/framework/config/SecurityConfig.java

@ -111,7 +111,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage").anonymous()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js","/**/*.jpg","/**/*.png","/zilbervue/admin/", "/profile/**", "/vehicle/**").permitAll()
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js","/**/*.jpg","/**/*.png","/zilbervue/admin/", "/profile/**"
// , "/vehicle/**"
).permitAll()
.antMatchers("/file/**","/bpmn/**","/swagger-ui.html","/swagger-ui", "/v3","/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()

Loading…
Cancel
Save