提交 f9df4e51 编写于 作者: 郝先瑞

fix: 未配置白名单导致无法启动问题修复

上级 de245351
......@@ -64,8 +64,10 @@ public class ResourceServerConfig {
log.info("whitelist path:{}", JSONUtil.toJsonStr(whitelistPaths));
http.authorizeHttpRequests((requests) ->
{
for (String whitelistPath : whitelistPaths) {
requests.requestMatchers(mvcMatcherBuilder.pattern(whitelistPath)).permitAll();
if (CollectionUtil.isNotEmpty(whitelistPaths)) {
for (String whitelistPath : whitelistPaths) {
requests.requestMatchers(mvcMatcherBuilder.pattern(whitelistPath)).permitAll();
}
}
requests.anyRequest().authenticated();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册