🐛 修复 BUG:修复放行url配置不生效的问题

This commit is contained in:
lishangbu committed 2018-11-11 12:24:23 +08:00
1 parent 547ae5cd90
commit a7d86c8541
6 files changed
+11 -8

No files matched your search

@@ -19,6 +19,7 @@ package com.pig4cloud.pigx.common.security.component;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.security.core.userdetails.UserDetailsService;
@@ -37,6 +38,7 @@ import org.springframework.web.client.RestTemplate;
* 2. 支持 获取用户全部信息
*/
@Slf4j
@Configuration
public class BaseResourceServerConfigurerAdapter extends ResourceServerConfigurerAdapter {
@Autowired
protected ResourceAuthExceptionEntryPoint resourceAuthExceptionEntryPoint;
@@ -98,6 +98,11 @@ swagger:
## spring security 配置
security:
oauth2:
client:
# 默认放行url,如果子模块重写这里的配置就会被覆盖
ignore-urls:
- '/actuator/**'
- '/v2/api-docs'
resource:
loadBalanced: true
token-info-uri: http://pigx-auth/oauth/check_token
@@ -105,5 +110,5 @@ security:
# log配置
logging:
level:
root: warn
root: error
com.pig4cloud.pigx: info
@@ -6,6 +6,8 @@ security:
client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)
scope: server
ignore-urls:
- '/actuator/**'
- '/v2/api-docs'
- '/service/**'
- '/editor-app/**'
- '/task/view/*'
@@ -5,10 +5,6 @@ security:
client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)
client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)
scope: server
ignore-urls:
- '/actuator/**'
- '/v2/api-docs'
# 数据源配置
spring:
datasource:
@@ -5,9 +5,6 @@ security:
client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)
client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)
scope: server
ignore-urls:
- '/actuator/**'
- '/v2/api-docs'
## 定时任务
spring:
# 保存定时任务的数据源
@@ -5,6 +5,7 @@ security:
client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)
client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)
scope: server
# 默认放行url,子模块重写时application-dev.yml中的公共配置会被覆盖,所以要把公共配置中的放行url再写一次
ignore-urls:
- '/actuator/**'
- '/v2/api-docs'