优化静态文件访问的问题

This commit is contained in:
gy b
2023-09-18 20:45:59 +08:00
parent 04d9172cce
commit f62373675d
2 changed files with 4 additions and 2 deletions
@@ -32,7 +32,6 @@ server:
max: 800
# Tomcat启动初始化的线程数,默认值10
min-spare: 100
# 日志配置
logging:
level:
@@ -89,6 +88,9 @@ spring:
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
web:
resources:
static-locations: file:/home/ruoyi/
# token配置
token:
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/home/**").permitAll()
.antMatchers("/login", "/register", "/captchaImage","/uploadPath/**").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()