diff --git a/youlai-auth/pom.xml b/youlai-auth/pom.xml index d8b1d16ac..511c609ac 100644 --- a/youlai-auth/pom.xml +++ b/youlai-auth/pom.xml @@ -152,13 +152,13 @@ 1.0.0 - + diff --git a/youlai-auth/src/main/resources/bootstrap-prod.yml b/youlai-auth/src/main/resources/bootstrap-prod.yml index 8e66504b5..dbaafa7e8 100644 --- a/youlai-auth/src/main/resources/bootstrap-prod.yml +++ b/youlai-auth/src/main/resources/bootstrap-prod.yml @@ -8,9 +8,10 @@ spring: nacos: discovery: server-addr: http://c.youlai.store:8848 + namespace: prod_namespace_id config: # docker启动nacos-server需要配置 server-addr: ${spring.cloud.nacos.discovery.server-addr} file-extension: yaml - group: DEFAULT_GROUP prefix: ${spring.application.name} + namespace: prod_namespace_id diff --git a/youlai-gateway/pom.xml b/youlai-gateway/pom.xml index b80b40c62..518522b7d 100644 --- a/youlai-gateway/pom.xml +++ b/youlai-gateway/pom.xml @@ -72,12 +72,6 @@ org.springframework.cloud spring-cloud-starter-loadbalancer - - - org.springframework.cloud - spring-cloud-starter-netflix-hystrix - 2.1.3.RELEASE - @@ -93,7 +87,13 @@ 1.0.0 - + + build-image + package + + build + + diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java b/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java index 2c196541c..591ca135a 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java @@ -35,6 +35,8 @@ public class AuthorizationManager implements ReactiveAuthorizationManager check(Mono mono, AuthorizationContext authorizationContext) { + + ServerHttpRequest request = authorizationContext.getExchange().getRequest(); String path = request.getMethodValue() + "_" + request.getURI().getPath(); PathMatcher pathMatcher = new AntPathMatcher(); @@ -48,11 +50,14 @@ public class AuthorizationManager implements ReactiveAuthorizationManager permissionRoles = redisTemplate.opsForHash().entries(AuthConstants.PERMISSION_ROLES_KEY); Iterator iterator = permissionRoles.keySet().iterator(); @@ -64,6 +69,8 @@ public class AuthorizationManager implements ReactiveAuthorizationManager authorizationDecisionMono = mono .filter(Authentication::isAuthenticated) .flatMapIterable(Authentication::getAuthorities) diff --git a/youlai-gateway/src/main/resources/bootstrap-prod.yml b/youlai-gateway/src/main/resources/bootstrap-prod.yml index 778e6a141..9f5a441d4 100644 --- a/youlai-gateway/src/main/resources/bootstrap-prod.yml +++ b/youlai-gateway/src/main/resources/bootstrap-prod.yml @@ -10,6 +10,8 @@ spring: nacos: discovery: server-addr: http://c.youlai.store:8848 + namespace: prod_namespace_id config: server-addr: ${spring.cloud.nacos.discovery.server-addr} file-extension: yaml + namespace: prod_namespace_id