From 61be16c8897058efbb60454449f28ee3ac1c5b23 Mon Sep 17 00:00:00 2001 From: herodotus Date: Wed, 11 Aug 2021 21:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20v2.5.4.40=201.=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=9A=E7=BA=A7=E7=BC=93?= =?UTF-8?q?=E5=AD=98=EF=BC=8C=E5=AE=9E=E7=8E=B0=E5=8F=AF=E4=BB=A5=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E8=AE=BE=E7=BD=AEallowNullValues=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E8=A7=A3=E5=86=B3=E5=AD=98=E5=82=A8=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E6=97=B6=E5=8D=A1=E6=AD=BB=E9=97=AE=E9=A2=98=E3=80=82=202.=20?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=A2=B3=E7=90=86=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=9D=83=E9=99=90=E4=BB=8EController?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E3=80=81=E6=B1=87=E6=80=BB=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=87=B3=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=BB=A5=E5=8F=8A=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=BF=AE=E6=94=B9=E5=90=8E=E6=9C=80=E7=BB=88=E5=9B=9E?= =?UTF-8?q?=E4=BC=A0=E5=90=8C=E6=AD=A5=E8=87=B3=E6=9C=8D=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E6=95=B4=E7=90=86=E9=80=BB=E8=BE=91=E4=BB=A5=E5=8F=8A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=B5=81=E3=80=82=E5=AE=8C=E7=BE=8E=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8D=95=E4=BD=93=E5=BC=8F=E6=9E=B6=E6=9E=84=E3=80=81UPMS?= =?UTF-8?q?=E8=87=AA=E8=BA=AB=E5=BA=94=E7=94=A8=E9=9C=80=E6=B1=82=E3=80=81?= =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E6=9E=B6=E6=9E=84=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E5=90=84=E6=9C=8D=E5=8A=A1=E5=A4=9A?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E7=AD=89=E5=90=84=E7=A7=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E3=80=82=203.=20=E5=A2=9E=E5=8A=A0Kafka?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=B3=A8=E5=85=A5=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E6=9D=A1=E4=BB=B6=E8=BD=AC=E6=8D=A2=E4=B8=BA@Conditio?= =?UTF-8?q?nalOnXXX=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E3=80=82=E9=81=BF=E5=85=8D=E5=8D=95=E4=BD=93?= =?UTF-8?q?=E7=89=88=E5=BA=94=E7=94=A8=E7=9B=B8=E5=85=B3=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E8=BF=87=E5=BA=A6=E4=BE=9D=E8=B5=96Kafka=E8=80=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8=204.=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=B7=B2=E7=9F=A5BUG?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=94=B1@Slf4j=E6=94=B9=E5=9B=9E=E4=BC=A0?= =?UTF-8?q?=E7=BB=9F=E6=97=A5=E5=BF=97=E7=BC=96=E5=86=99=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E4=B8=80=E6=96=B9=E9=9D=A2=E6=8F=90=E9=AB=98=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=95=88=E7=8E=87=EF=BC=8C=E5=8F=A6=E4=B8=80=E6=96=B9?= =?UTF-8?q?=E9=9D=A2=E8=A7=A3=E5=86=B3=E6=BA=90=E4=BB=A3=E7=A0=81=E5=8C=85?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=97=B6Idea=E6=8F=90=E9=86=92=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../docker/docker-compose/herodotus/.env | 2 +- dependencies/pom.xml | 2 +- packages/eurynome-cloud-assistant/pom.xml | 2 +- .../annotation/ConditionalOnKafkaEnabled.java | 41 +++++ .../assistant/utils/DestinationResolver.java} | 41 ++--- packages/eurynome-cloud-common/pom.xml | 4 +- packages/eurynome-cloud-constant/pom.xml | 2 +- .../constant/magic/CacheConstants.java | 13 +- .../constant/magic/PropertyConstants.java | 1 + packages/eurynome-cloud-crud/pom.xml | 4 +- packages/eurynome-cloud-data/pom.xml | 4 +- .../data/cache/layer/HerodotusCache.java | 26 +-- .../cache/layer/HerodotusCacheManager.java | 11 +- .../configuration/CaffeineConfiguration.java | 1 + .../data/configuration/DataConfiguration.java | 6 +- .../configuration/KafkaConfiguration.java | 2 + .../configuration/RedisConfiguration.java | 35 +--- .../data/properties/CacheProperties.java | 18 +- packages/eurynome-cloud-kernel/pom.xml | 4 +- packages/eurynome-cloud-oauth-starter/pom.xml | 4 +- packages/eurynome-cloud-oauth/pom.xml | 4 +- packages/eurynome-cloud-rest/pom.xml | 4 +- packages/eurynome-cloud-security/pom.xml | 4 +- .../definition/domain/SecurityAttribute.java | 163 ++++++++++++++++++ packages/eurynome-cloud-starter/pom.xml | 4 +- packages/pom.xml | 2 +- platform/eurynome-cloud-gateway/pom.xml | 4 +- platform/eurynome-cloud-management/pom.xml | 4 +- platform/eurynome-cloud-uaa/pom.xml | 4 +- platform/pom.xml | 2 +- pom.xml | 4 +- services/eurynome-cloud-bpmn-ability/pom.xml | 4 +- services/eurynome-cloud-bpmn-rest/pom.xml | 4 +- services/eurynome-cloud-upms-ability/pom.xml | 4 +- services/eurynome-cloud-upms-api/pom.xml | 4 +- .../upms/api/entity/system/SysMetadata.java | 113 +++++------- .../eurynome/upms/api/helper/UpmsHelper.java | 8 +- .../AbstractRelationEntityListener.java | 88 ++++++++++ .../entity/SysRoleEntityListener.java | 69 ++------ .../entity/SysScopeEntityListener.java | 70 +++----- .../event/SysMetadataRelationChangeEvent.java | 8 +- services/eurynome-cloud-upms-logic/pom.xml | 4 +- .../configuration/UpmsLogicConfiguration.java | 2 + .../RemoteRequestMappingGatherListener.java | 4 +- .../RequestMappingStoreProcessor.java | 2 +- services/eurynome-cloud-upms-rest/pom.xml | 4 +- services/pom.xml | 2 +- 48 files changed, 511 insertions(+), 303 deletions(-) create mode 100644 packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnKafkaEnabled.java rename packages/{eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/core/SecurityMetadata.java => eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/utils/DestinationResolver.java} (50%) create mode 100644 packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/domain/SecurityAttribute.java create mode 100644 services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/AbstractRelationEntityListener.java rename services/{eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability => eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic}/listener/RemoteRequestMappingGatherListener.java (95%) rename services/{eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability => eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic}/processor/RequestMappingStoreProcessor.java (97%) diff --git a/README.md b/README.md index 7785fc7fd..13e383cd2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Nacos 2.0.3 License Apache 2.0 码匠君 - Version 2.5.4.30 + Version 2.5.4.40 Gitee star Gitee fork

diff --git a/configurations/docker/docker-compose/herodotus/.env b/configurations/docker/docker-compose/herodotus/.env index 18e0cb7e2..ed1b5e02b 100644 --- a/configurations/docker/docker-compose/herodotus/.env +++ b/configurations/docker/docker-compose/herodotus/.env @@ -1,4 +1,4 @@ -VERSION=2.5.4.30 +VERSION=2.5.4.40 GATEWAY_SERVICE_NAME=eurynome-cloud-gateway GATEWAY_SERVICE_PORT=8847 UAA_SERVICE_NAME=eurynome-cloud-uaa diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 471e97304..31ae63055 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -35,7 +35,7 @@ cn.herodotus.eurynome dependencies - 2.5.4.30 + 2.5.4.40 pom eurynome-cloud-dependencies diff --git a/packages/eurynome-cloud-assistant/pom.xml b/packages/eurynome-cloud-assistant/pom.xml index 7f9cc831b..5bb8f7b50 100644 --- a/packages/eurynome-cloud-assistant/pom.xml +++ b/packages/eurynome-cloud-assistant/pom.xml @@ -27,7 +27,7 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 diff --git a/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnKafkaEnabled.java b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnKafkaEnabled.java new file mode 100644 index 000000000..4f27d9d32 --- /dev/null +++ b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnKafkaEnabled.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2019-2021 Gengwei Zheng (herodotus@aliyun.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Project Name: eurynome-cloud + * Module Name: eurynome-cloud-assistant + * File Name: ConditionalOnKafkaEnabled.java + * Author: gengwei.zheng + * Date: 2021/08/11 20:36:11 + */ + +package cn.herodotus.eurynome.assistant.annotation; + +import cn.herodotus.eurynome.constant.magic.PropertyConstants; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; + +import java.lang.annotation.*; + +/** + *

Description: kafka是否开启条件准基

+ * + * @author : gengwei.zheng + * @date : 2021/8/11 20:36 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.METHOD}) +@Documented +@ConditionalOnProperty(value = PropertyConstants.ITEM_PLATFORM_KAFKA_ENABLED) +public @interface ConditionalOnKafkaEnabled { +} diff --git a/packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/core/SecurityMetadata.java b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/utils/DestinationResolver.java similarity index 50% rename from packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/core/SecurityMetadata.java rename to packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/utils/DestinationResolver.java index a5470d8c8..b95f4afdd 100644 --- a/packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/core/SecurityMetadata.java +++ b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/utils/DestinationResolver.java @@ -14,43 +14,28 @@ * limitations under the License. * * Project Name: eurynome-cloud - * Module Name: eurynome-cloud-security - * File Name: SecurityMetadata.java + * Module Name: eurynome-cloud-assistant + * File Name: DestinationResolver.java * Author: gengwei.zheng - * Date: 2021/08/05 17:14:05 + * Date: 2021/08/11 20:39:11 */ -package cn.herodotus.eurynome.security.definition.core; +package cn.herodotus.eurynome.assistant.utils; -import org.springframework.security.core.GrantedAuthority; - -import java.util.Collection; +import org.springframework.cloud.bus.event.Destination; +import org.springframework.cloud.bus.event.PathDestinationFactory; /** - *

Description: 安全元数据

+ *

Description: Spring Cloud Bus Destination辅助类

* * @author : gengwei.zheng - * @date : 2021/8/5 17:14 + * @date : 2021/8/11 20:39 */ -public interface SecurityMetadata { - - String getDefaultExpression(); - - String getStaticExpression(); - - String getDynamicExpression(); - - String getScopeExpression(); - - Collection getRoles(); - - Collection getScopes(); - - String getIpExpression(); - - String getUrl(); +public class DestinationResolver { - String getRequestMethod(); + private static final PathDestinationFactory pathDestinationFactory = new PathDestinationFactory(); - String getServiceId(); + public static Destination create(String serviceName) { + return pathDestinationFactory.getDestination(serviceName + ":**"); + } } diff --git a/packages/eurynome-cloud-common/pom.xml b/packages/eurynome-cloud-common/pom.xml index db269d1da..8c251aaad 100644 --- a/packages/eurynome-cloud-common/pom.xml +++ b/packages/eurynome-cloud-common/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-common - 2.5.4.30 + 2.5.4.40 jar 结对基础通用的工具类包,此包的定位是放在任何工程中都可以使用,而且尽可能依赖少的存在上下文组件 diff --git a/packages/eurynome-cloud-constant/pom.xml b/packages/eurynome-cloud-constant/pom.xml index 05f1d5a45..5da14ea10 100644 --- a/packages/eurynome-cloud-constant/pom.xml +++ b/packages/eurynome-cloud-constant/pom.xml @@ -27,7 +27,7 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 diff --git a/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/CacheConstants.java b/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/CacheConstants.java index 2f2b0f860..f944a1329 100644 --- a/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/CacheConstants.java +++ b/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/CacheConstants.java @@ -30,13 +30,20 @@ */ public class CacheConstants { - public static final String CACHE_SIMPLE_BASE_PREFIX = "cache:simple:"; + public static final String CACHE_PREFIX = "cache:"; - public static final String CACHE_TOKEN_BASE_PREFIX = "cache:token:"; + public static final String CACHE_SIMPLE_BASE_PREFIX = CACHE_PREFIX + "simple:"; + public static final String CACHE_TOKEN_BASE_PREFIX = CACHE_PREFIX + "token:"; + + public static final String CACHE_SECURITY_PREFIX = CACHE_PREFIX + "security:"; + public static final String CACHE_SECURITY_METADATA_PREFIX = CACHE_SECURITY_PREFIX + "metadata:"; + + public static final String CACHE_NAME_SECURITY_METADATA_ATTRIBUTES = CACHE_SECURITY_METADATA_PREFIX + "attributes:"; + public static final String CACHE_NAME_SECURITY_METADATA_INDEXABLE = CACHE_SECURITY_METADATA_PREFIX + "indexable:"; + public static final String CACHE_NAME_SECURITY_METADATA_COMPATIBLE = CACHE_SECURITY_METADATA_PREFIX + "compatible:"; public static final int DEFAULT_UPMS_CACHE_EXPIRE = 86400; public static final int DEFAULT_UPMS_LOCAL_LIMIT = 1000; - public static final String INDEX_CACHE_NAME = "index:"; } diff --git a/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/PropertyConstants.java b/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/PropertyConstants.java index d7a4ffb8b..1d97b40e2 100644 --- a/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/PropertyConstants.java +++ b/packages/eurynome-cloud-constant/src/main/java/cn/herodotus/eurynome/constant/magic/PropertyConstants.java @@ -65,6 +65,7 @@ public class PropertyConstants { public static final String ITEM_PLATFORM_DATA_ACCESS_STRATEGY = PROPERTY_PREFIX_PLATFORM + ".data-access-strategy"; public static final String ITEM_PLATFORM_ARCHITECTURE = PROPERTY_PREFIX_PLATFORM + ".architecture"; + public static final String ITEM_PLATFORM_KAFKA_ENABLED = PROPERTY_PREFIX_MANAGEMENT_QUEUE + ".kafka.enabled"; public static final String ANNOTATION_DEBEZIUM_ENABLED = "${herodotus.platform.debezium.enabled}"; } diff --git a/packages/eurynome-cloud-crud/pom.xml b/packages/eurynome-cloud-crud/pom.xml index 6df6a966f..f5f8d719b 100644 --- a/packages/eurynome-cloud-crud/pom.xml +++ b/packages/eurynome-cloud-crud/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-crud - 2.5.4.30 + 2.5.4.40 jar diff --git a/packages/eurynome-cloud-data/pom.xml b/packages/eurynome-cloud-data/pom.xml index edae598e1..3e12ec41e 100644 --- a/packages/eurynome-cloud-data/pom.xml +++ b/packages/eurynome-cloud-data/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-data - 2.5.4.30 + 2.5.4.40 jar 数据相关通用代码组件包,包括JPA,Redis,数据实体等相关内容 diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCache.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCache.java index ae0bba231..f37347170 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCache.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCache.java @@ -28,13 +28,11 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.cache.Cache; import org.springframework.cache.caffeine.CaffeineCache; import org.springframework.cache.support.AbstractValueAdaptingCache; import org.springframework.cache.support.NullValue; import org.springframework.data.redis.cache.RedisCache; import org.springframework.lang.Nullable; -import org.springframework.util.Assert; import java.util.concurrent.Callable; @@ -45,6 +43,7 @@ * @date : 2021/7/14 11:04 */ public class HerodotusCache extends AbstractValueAdaptingCache { + private static final Logger log = LoggerFactory.getLogger(HerodotusCache.class); private final String name; @@ -53,10 +52,6 @@ public class HerodotusCache extends AbstractValueAdaptingCache { private final boolean desensitization; private final boolean clearRemoteOnExit; - public HerodotusCache(String name, CaffeineCache caffeineCache, RedisCache redisCache, boolean desensitization, boolean clearRemoteOnExit) { - this(name, caffeineCache, redisCache, desensitization, clearRemoteOnExit, true); - } - public HerodotusCache(String name, CaffeineCache caffeineCache, RedisCache redisCache, boolean desensitization, boolean clearRemoteOnExit, boolean allowNullValues) { super(allowNullValues); this.name = name; @@ -139,7 +134,6 @@ public T get(Object key, Class type) { String secure = secure(key); - T caffeineValue = caffeineCache.get(secure, type); if (ObjectUtils.isNotEmpty(caffeineValue)) { log.trace("[Eurynome] |- CACHE - Get with type form caffeine cache, hit the cache."); @@ -189,14 +183,20 @@ public T get(Object key, Callable valueLoader) { } @Override - public void put(Object key, Object value) { + public void put(Object key, @Nullable Object value) { - String secure = secure(key); + if (!isAllowNullValues() && value == null) { + throw new IllegalArgumentException(String.format( + "Cache '%s' does not allow 'null' values. Avoid storing null via '@Cacheable(unless=\"#result == null\")' or configure RedisCache to allow 'null' via RedisCacheConfiguration.", + name)); + } else { + String secure = secure(key); - caffeineCache.put(secure, value); - redisCache.put(secure, value); + caffeineCache.put(secure, value); + redisCache.put(secure, value); - log.debug("[Eurynome] |- CACHE - Put data into Herodotus Cache, with key: [{}] and value: [{}]", secure, value); + log.debug("[Eurynome] |- CACHE - Put data into Herodotus Cache, with key: [{}] and value: [{}]", secure, value); + } } @Override @@ -230,7 +230,7 @@ public void evict(Object key) { @Override public void clear() { - log.debug("[Eurynome] |- CACHE - Clear Herodotus Cache."); + log.trace("[Eurynome] |- CACHE - Clear Herodotus Cache."); if (clearRemoteOnExit) { redisCache.clear(); diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCacheManager.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCacheManager.java index fda39cd20..442a43f48 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCacheManager.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/cache/layer/HerodotusCacheManager.java @@ -52,6 +52,7 @@ public class HerodotusCacheManager implements CacheManager { private CaffeineCacheManager caffeineCacheManager; private boolean desensitization = true; private boolean clearRemoteOnExit = false; + private boolean allowNullValues = true; private boolean dynamic = true; @@ -80,6 +81,14 @@ public void setClearRemoteOnExit(boolean clearRemoteOnExit) { this.clearRemoteOnExit = clearRemoteOnExit; } + public boolean isAllowNullValues() { + return allowNullValues; + } + + public void setAllowNullValues(boolean allowNullValues) { + this.allowNullValues = allowNullValues; + } + /** * Specify the set of cache names for this CacheManager's 'static' mode. *

The number of caches and their names will be fixed after a call to this method, @@ -102,7 +111,7 @@ protected Cache createHerodotusCache(String name) { CaffeineCache caffeineCache = (CaffeineCache) this.caffeineCacheManager.getCache(name); RedisCache redisCache = (RedisCache) this.redisCacheManager.getCache(name); log.debug("[Eurynome] |- CACHE - Herodotus cache [{}] is CREATED.", name); - return new HerodotusCache(name, caffeineCache, redisCache, desensitization, clearRemoteOnExit); + return new HerodotusCache(name, caffeineCache, redisCache, desensitization, clearRemoteOnExit, isAllowNullValues()); } @Override diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/CaffeineConfiguration.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/CaffeineConfiguration.java index 33fdb2734..63e83ff32 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/CaffeineConfiguration.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/CaffeineConfiguration.java @@ -68,6 +68,7 @@ public Caffeine caffeine() { public CaffeineCacheManager caffeineCacheManager() { CaffeineCacheManager caffeineCacheManager = new CaffeineCacheManager(); caffeineCacheManager.setCaffeine(caffeine()); + caffeineCacheManager.setAllowNullValues(cacheProperties.getAllowNullValues()); log.trace("[Eurynome] |- Bean [Caffeine Cache Manager] Auto Configure."); diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/DataConfiguration.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/DataConfiguration.java index e99caf3a5..dcb323a78 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/DataConfiguration.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/DataConfiguration.java @@ -25,7 +25,8 @@ import cn.herodotus.eurynome.data.cache.layer.HerodotusCacheManager; import cn.herodotus.eurynome.data.properties.CacheProperties; import cn.hutool.extra.spring.SpringUtil; -import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration; @@ -63,13 +64,13 @@ * @author : gengwei.zheng * @date : 2020/3/4 10:49 */ -@Slf4j @Configuration(proxyBeanMethods = false) @EnableJpaAuditing @AutoConfigureAfter(JpaRepositoriesAutoConfiguration.class) @Import({SpringUtil.class, CaffeineConfiguration.class, KafkaConfiguration.class}) public class DataConfiguration { + private static final Logger log = LoggerFactory.getLogger(DataConfiguration.class); @Autowired private CacheProperties cacheProperties; @@ -87,6 +88,7 @@ public HerodotusCacheManager herodotusCacheManager(CaffeineCacheManager caffeine herodotusCacheManager.setRedisCacheManager(redisCacheManager); herodotusCacheManager.setDesensitization(cacheProperties.getDesensitization()); herodotusCacheManager.setClearRemoteOnExit(cacheProperties.getClearRemoteOnExit()); + herodotusCacheManager.setAllowNullValues(cacheProperties.getAllowNullValues()); log.trace("[Eurynome] |- Bean [Herodotus Cache Manager] Auto Configure."); diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/KafkaConfiguration.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/KafkaConfiguration.java index 729617793..26f08f643 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/KafkaConfiguration.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/KafkaConfiguration.java @@ -22,6 +22,7 @@ package cn.herodotus.eurynome.data.configuration; +import cn.herodotus.eurynome.assistant.annotation.ConditionalOnKafkaEnabled; import cn.herodotus.eurynome.data.properties.QueueProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,6 +42,7 @@ * @date : 2021/8/8 10:41 */ @Configuration +@ConditionalOnKafkaEnabled public class KafkaConfiguration { private static final Logger log = LoggerFactory.getLogger(KafkaConfiguration.class); diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/RedisConfiguration.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/RedisConfiguration.java index 5dcc6fa8f..07bd03934 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/RedisConfiguration.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/configuration/RedisConfiguration.java @@ -115,11 +115,15 @@ public RedisCacheManager redisCacheManager() { RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(lettuceConnectionFactory); - RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig() + RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig(); // .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(keySerializer())) // .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(valueSerializer())) - .disableCachingNullValues() - .entryTtl(cacheProperties.getTtl()); + redisCacheConfiguration.entryTtl(cacheProperties.getTtl()); + + boolean allowNullValues = cacheProperties.getAllowNullValues(); + if (!allowNullValues) { + redisCacheConfiguration.disableCachingNullValues(); + } RedisCacheManager redisCacheManager = new RedisCacheManager(redisCacheWriter, redisCacheConfiguration); redisCacheManager.setTransactionAware(false); @@ -128,29 +132,4 @@ public RedisCacheManager redisCacheManager() { log.trace("[Eurynome] |- Bean [Redis Cache Manager] Auto Configure."); return redisCacheManager; } - -// @Bean -// @ConditionalOnBean(RedisTemplate.class) -// public RedisCaffeineCacheManager cacheManager(RedisTemplate redisTemplate) { -// log.debug("[Eurynome] |- Bean [Redis Caffeine Cache Manager] Auto Configure."); -// return new RedisCaffeineCacheManager(redisCaffeineCacheProperties, redisTemplate); -// } -// -// @Bean(name = CacheConstants.DEFAULT_KEY_GENERATOR) -// public KeyGenerator keyGenerator(){ -// log.debug("[Eurynome] |- Bean [Redis Caffeine Cache Key Generator] Auto Configure."); -// return new RedisCaffeineCacheKeyGenerator(); -// } -// -// @Bean -// public RedisMessageListenerContainer redisMessageListenerContainer(RedisTemplate redisTemplate, -// RedisCaffeineCacheManager redisCaffeineCacheManager) { -// RedisMessageListenerContainer redisMessageListenerContainer = new RedisMessageListenerContainer(); -// redisMessageListenerContainer.setConnectionFactory(redisTemplate.getConnectionFactory()); -// CacheMessageListener cacheMessageListener = new CacheMessageListener(redisTemplate, redisCaffeineCacheManager); -// redisMessageListenerContainer.addMessageListener(cacheMessageListener, new ChannelTopic(redisCaffeineCacheProperties.getRedis().getTopic())); -// -// log.debug("[Eurynome] |- Bean [Redis Message Listener Container] Auto Configure."); -// return redisMessageListenerContainer; -// } } diff --git a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/properties/CacheProperties.java b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/properties/CacheProperties.java index ad23a6add..d9b77cde8 100644 --- a/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/properties/CacheProperties.java +++ b/packages/eurynome-cloud-data/src/main/java/cn/herodotus/eurynome/data/properties/CacheProperties.java @@ -41,7 +41,7 @@ public class CacheProperties { /** * 分布式缓存Redis端是否进行数据脱敏, 默认值,true - * + *

* Hibernate二级缓存中,会基于SQL进行数据缓存。这种缓存以SQL作为key,一方面这个Key会比较长,另一方面SQL明文存入Redis缺少安全性。 * 通过这个配置,可以设定是否对Hibernate二级缓存的SQL进行脱敏,脱敏后会将SQL转换为MD5值。当然这也会带来一定的性能损耗 */ @@ -49,11 +49,16 @@ public class CacheProperties { /** * 退出时是否清理远端缓存,默认值,false - * + *

* 服务退出时,会清理本地以及远端的缓存,为了在集群情况下避免因此导致的缓存击穿问题,默认退出时不清除远端缓存。 */ private Boolean clearRemoteOnExit = false; + /** + * 是否允许存储空值 + */ + private Boolean allowNullValues = true; + /** * 统一缓存时长,默认:1 */ @@ -101,6 +106,14 @@ public Duration getTtl() { return ttl; } + public Boolean getAllowNullValues() { + return allowNullValues; + } + + public void setAllowNullValues(Boolean allowNullValues) { + this.allowNullValues = allowNullValues; + } + public void setTtl(Duration ttl) { this.ttl = ttl; } @@ -139,6 +152,7 @@ public String toString() { return MoreObjects.toStringHelper(this) .add("desensitization", desensitization) .add("clearRemoteOnExit", clearRemoteOnExit) + .add("allowNullValues", allowNullValues) .add("duration", duration) .add("unit", unit) .add("ttl", ttl) diff --git a/packages/eurynome-cloud-kernel/pom.xml b/packages/eurynome-cloud-kernel/pom.xml index 56095c373..6c2d63c1f 100644 --- a/packages/eurynome-cloud-kernel/pom.xml +++ b/packages/eurynome-cloud-kernel/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-kernel - 2.5.4.30 + 2.5.4.40 jar 平台通用的基础依赖,以及接入及管理等通用代码,上中台必需的基础代码。增加这层包,主要目的是抽取webflux和web依赖的通用性,降低其它包之间的耦合性,比如之前data要依赖logstash,logstash要依赖managementproperties diff --git a/packages/eurynome-cloud-oauth-starter/pom.xml b/packages/eurynome-cloud-oauth-starter/pom.xml index 75be2dd5a..375146ef6 100644 --- a/packages/eurynome-cloud-oauth-starter/pom.xml +++ b/packages/eurynome-cloud-oauth-starter/pom.xml @@ -30,11 +30,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-oauth-starter - 2.5.4.30 + 2.5.4.40 jar diff --git a/packages/eurynome-cloud-oauth/pom.xml b/packages/eurynome-cloud-oauth/pom.xml index 8a0d7c18b..6f94bc363 100644 --- a/packages/eurynome-cloud-oauth/pom.xml +++ b/packages/eurynome-cloud-oauth/pom.xml @@ -29,12 +29,12 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-oauth - 2.5.4.30 + 2.5.4.40 jar diff --git a/packages/eurynome-cloud-rest/pom.xml b/packages/eurynome-cloud-rest/pom.xml index a96bf66bf..3f5084d58 100644 --- a/packages/eurynome-cloud-rest/pom.xml +++ b/packages/eurynome-cloud-rest/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-rest - 2.5.4.30 + 2.5.4.40 jar diff --git a/packages/eurynome-cloud-security/pom.xml b/packages/eurynome-cloud-security/pom.xml index e8813097e..9fe9ef6f9 100644 --- a/packages/eurynome-cloud-security/pom.xml +++ b/packages/eurynome-cloud-security/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-security - 2.5.4.30 + 2.5.4.40 jar diff --git a/packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/domain/SecurityAttribute.java b/packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/domain/SecurityAttribute.java new file mode 100644 index 000000000..e5560bf5f --- /dev/null +++ b/packages/eurynome-cloud-security/src/main/java/cn/herodotus/eurynome/security/definition/domain/SecurityAttribute.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2019-2021 Gengwei Zheng (herodotus@aliyun.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Project Name: eurynome-cloud + * Module Name: eurynome-cloud-security + * File Name: SecurityAttribute.java + * Author: gengwei.zheng + * Date: 2021/08/11 20:52:11 + */ + +package cn.herodotus.eurynome.security.definition.domain; + +import cn.herodotus.eurynome.security.definition.core.HerodotusAuthority; +import com.google.common.base.MoreObjects; + +import java.io.Serializable; +import java.util.Set; + +/** + *

Description: Security Metadata 传输数据实体

+ * + * @author : gengwei.zheng + * @date : 2021/8/11 20:52 + */ +public class SecurityAttribute implements Serializable { + + private String metadataId; + + private String defaultExpression; + + private String staticExpression; + + private String dynamicExpression; + + private String scopeExpression; + + private String ipExpression; + + private String url; + + private String requestMethod; + + private String serviceId; + + private Set roles; + + private Set scopes; + + public String getMetadataId() { + return metadataId; + } + + public void setMetadataId(String metadataId) { + this.metadataId = metadataId; + } + + public String getDefaultExpression() { + return defaultExpression; + } + + public void setDefaultExpression(String defaultExpression) { + this.defaultExpression = defaultExpression; + } + + public String getStaticExpression() { + return staticExpression; + } + + public void setStaticExpression(String staticExpression) { + this.staticExpression = staticExpression; + } + + public String getDynamicExpression() { + return dynamicExpression; + } + + public void setDynamicExpression(String dynamicExpression) { + this.dynamicExpression = dynamicExpression; + } + + public String getScopeExpression() { + return scopeExpression; + } + + public void setScopeExpression(String scopeExpression) { + this.scopeExpression = scopeExpression; + } + + public String getIpExpression() { + return ipExpression; + } + + public void setIpExpression(String ipExpression) { + this.ipExpression = ipExpression; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getRequestMethod() { + return requestMethod; + } + + public void setRequestMethod(String requestMethod) { + this.requestMethod = requestMethod; + } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public Set getRoles() { + return roles; + } + + public void setRoles(Set roles) { + this.roles = roles; + } + + public Set getScopes() { + return scopes; + } + + public void setScopes(Set scopes) { + this.scopes = scopes; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("metadataId", metadataId) + .add("defaultExpression", defaultExpression) + .add("staticExpression", staticExpression) + .add("dynamicExpression", dynamicExpression) + .add("scopeExpression", scopeExpression) + .add("ipExpression", ipExpression) + .add("url", url) + .add("requestMethod", requestMethod) + .add("serviceId", serviceId) + .toString(); + } +} diff --git a/packages/eurynome-cloud-starter/pom.xml b/packages/eurynome-cloud-starter/pom.xml index 7e8f298a3..505bcdbd9 100644 --- a/packages/eurynome-cloud-starter/pom.xml +++ b/packages/eurynome-cloud-starter/pom.xml @@ -29,11 +29,11 @@ packages cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-starter - 2.5.4.30 + 2.5.4.40 通用配置starter,此包的定位是统一未来接入的微服务使用 jar diff --git a/packages/pom.xml b/packages/pom.xml index e028fb8ae..655ed6e5a 100644 --- a/packages/pom.xml +++ b/packages/pom.xml @@ -29,7 +29,7 @@ eurynome-cloud cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 packages diff --git a/platform/eurynome-cloud-gateway/pom.xml b/platform/eurynome-cloud-gateway/pom.xml index c28ab6ebb..1edfd8495 100644 --- a/platform/eurynome-cloud-gateway/pom.xml +++ b/platform/eurynome-cloud-gateway/pom.xml @@ -29,11 +29,11 @@ platform cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-gateway - 2.5.4.30 + 2.5.4.40 jar diff --git a/platform/eurynome-cloud-management/pom.xml b/platform/eurynome-cloud-management/pom.xml index ab3fcb8f2..3f73c60ec 100644 --- a/platform/eurynome-cloud-management/pom.xml +++ b/platform/eurynome-cloud-management/pom.xml @@ -29,11 +29,11 @@ platform cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-management - 2.5.4.30 + 2.5.4.40 jar diff --git a/platform/eurynome-cloud-uaa/pom.xml b/platform/eurynome-cloud-uaa/pom.xml index bcdf093c5..93e61a6d2 100644 --- a/platform/eurynome-cloud-uaa/pom.xml +++ b/platform/eurynome-cloud-uaa/pom.xml @@ -29,11 +29,11 @@ platform cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-uaa - 2.5.4.30 + 2.5.4.40 jar diff --git a/platform/pom.xml b/platform/pom.xml index beb03ccc1..6d820a5ee 100644 --- a/platform/pom.xml +++ b/platform/pom.xml @@ -29,7 +29,7 @@ eurynome-cloud cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 diff --git a/pom.xml b/pom.xml index 8e3c1a397..cb508f853 100644 --- a/pom.xml +++ b/pom.xml @@ -7,12 +7,12 @@ cn.herodotus.eurynome dependencies - 2.5.4.30 + 2.5.4.40 dependencies/pom.xml eurynome-cloud - 2.5.4.30 + 2.5.4.40 pom eurynome-cloud diff --git a/services/eurynome-cloud-bpmn-ability/pom.xml b/services/eurynome-cloud-bpmn-ability/pom.xml index abd6502b8..c9b1a0763 100644 --- a/services/eurynome-cloud-bpmn-ability/pom.xml +++ b/services/eurynome-cloud-bpmn-ability/pom.xml @@ -27,12 +27,12 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 eurynome-cloud-bpmn-ability - 2.5.4.30 + 2.5.4.40 基于Camunda工作流的服务 diff --git a/services/eurynome-cloud-bpmn-rest/pom.xml b/services/eurynome-cloud-bpmn-rest/pom.xml index 12ae40436..3bfe5222f 100644 --- a/services/eurynome-cloud-bpmn-rest/pom.xml +++ b/services/eurynome-cloud-bpmn-rest/pom.xml @@ -27,12 +27,12 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 eurynome-cloud-bpmn-rest - 2.5.4.30 + 2.5.4.40 jar diff --git a/services/eurynome-cloud-upms-ability/pom.xml b/services/eurynome-cloud-upms-ability/pom.xml index 2362075a1..15dae8037 100644 --- a/services/eurynome-cloud-upms-ability/pom.xml +++ b/services/eurynome-cloud-upms-ability/pom.xml @@ -27,12 +27,12 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 4.0.0 eurynome-cloud-upms-ability - 2.5.4.30 + 2.5.4.40 diff --git a/services/eurynome-cloud-upms-api/pom.xml b/services/eurynome-cloud-upms-api/pom.xml index cbfa69cfd..292720028 100644 --- a/services/eurynome-cloud-upms-api/pom.xml +++ b/services/eurynome-cloud-upms-api/pom.xml @@ -29,11 +29,11 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-upms-api - 2.5.4.30 + 2.5.4.40 diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysMetadata.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysMetadata.java index 4e7b09208..d7a5879ed 100644 --- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysMetadata.java +++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysMetadata.java @@ -23,16 +23,15 @@ package cn.herodotus.eurynome.upms.api.entity.system; import cn.herodotus.eurynome.data.base.entity.BaseSysEntity; -import cn.herodotus.eurynome.security.definition.core.SecurityMetadata; import cn.herodotus.eurynome.upms.api.constants.UpmsConstants; import cn.herodotus.eurynome.upms.api.entity.oauth.OAuth2DynamicExpressions; import cn.herodotus.eurynome.upms.api.entity.oauth.OAuth2IpAddresses; import cn.herodotus.eurynome.upms.api.entity.oauth.OAuth2Scopes; import cn.herodotus.eurynome.upms.api.entity.oauth.OAuth2StaticExpressions; import cn.herodotus.eurynome.upms.api.listener.entity.SysMetadataEntityListener; +import com.google.common.base.MoreObjects; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.apache.commons.lang3.ObjectUtils; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; @@ -54,12 +53,12 @@ @Cacheable @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = UpmsConstants.REGION_SYS_METADATA) @EntityListeners(value = {SysMetadataEntityListener.class}) -public class SysMetadata extends BaseSysEntity implements SecurityMetadata { +public class SysMetadata extends BaseSysEntity { @ApiModelProperty(value = "元数据ID") @Id @GeneratedValue(generator = "metadata-uuid") - @GenericGenerator(name = "metadata-uuid", strategy = "cn.herodotus.eurynome.upms.api.generator.SysMetadataUUIDGenerator") + @GenericGenerator(name = "metadata-uuid", strategy = "cn.herodotus.cloud.upms.api.generator.SysMetadataUUIDGenerator") @Column(name = "metadata_id", length = 64) private String metadataId; @@ -77,29 +76,29 @@ public class SysMetadata extends BaseSysEntity implements SecurityMetadata { @ApiModelProperty(value = "默认表达式", notes = "该值即authority_code值,会被封装成hasAuthority('XX'), 是自动生成的默认权限") @Column(name = "default_expression", length = 128) - private String defaultExpressionElement; + private String defaultExpression; @ApiModelProperty(value = "Scope权限表达式", notes = "该表达式要符合ScopeVoter规则") @Column(name = "scope_expression", length = 128) - private String scopeExpressionElement; + private String scopeExpression; - @ApiModelProperty(value = "静态字符串表达式", notes = "Spring Security中常规字符串权限,无须拼装,字符串本身即权限") + @ApiModelProperty(value = "静态字符串表达式", notes = "Security和OAuth2涉及的表达式字符串") @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = UpmsConstants.REGION_OAUTH_STATIC_EXPRESSIONS) @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "static_expression_id", referencedColumnName = "expression_id") - private OAuth2StaticExpressions staticExpressionElement; + private OAuth2StaticExpressions staticExpression; - @ApiModelProperty(value = "动态字符串表达式", notes = "Spring Security中常规字符串权限,无须拼装,字符串本身即权限") + @ApiModelProperty(value = "动态字符串表达式", notes = "通过UI界面等配置生成的合规的表达式") @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = UpmsConstants.REGION_OAUTH_DYNAMIC_EXPRESSIONS) @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "dynamic_expression_id", referencedColumnName = "expression_id") - private OAuth2DynamicExpressions dynamicExpressionElement; + private OAuth2DynamicExpressions dynamicExpression; - @ApiModelProperty(value = "动态权限表达式", notes = "该表达式要符合WebExpressionVoter规则,根据配置动态生成") + @ApiModelProperty(value = "IP地址表达式", notes = "该表达式要符合WebExpressionVoter规则,根据配置的IP地址动态生成") @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = UpmsConstants.REGION_OAUTH_IP_ADDRESSES) @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "ip_expression_id", referencedColumnName = "ip_id") - private OAuth2IpAddresses ipExpressionElement; + private OAuth2IpAddresses ipExpression; @ApiModelProperty(value = "动态权限表达式", notes = "该表达式要符合WebExpressionVoter规则,根据配置动态生成") @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = UpmsConstants.REGION_SYS_ROLE) @@ -137,7 +136,6 @@ public void setMetadataId(String metadataId) { this.metadataId = metadataId; } - @Override public String getUrl() { return url; } @@ -146,7 +144,6 @@ public void setUrl(String url) { this.url = url; } - @Override public String getRequestMethod() { return requestMethod; } @@ -155,7 +152,6 @@ public void setRequestMethod(String requestMethod) { this.requestMethod = requestMethod; } - @Override public String getServiceId() { return serviceId; } @@ -164,65 +160,46 @@ public void setServiceId(String serviceId) { this.serviceId = serviceId; } - public String getDefaultExpressionElement() { - return defaultExpressionElement; - } - - public void setDefaultExpressionElement(String defaultExpressionVoter) { - this.defaultExpressionElement = defaultExpressionVoter; + public String getDefaultExpression() { + return defaultExpression; } - public OAuth2StaticExpressions getStaticExpressionElement() { - return staticExpressionElement; + public void setDefaultExpression(String defaultExpression) { + this.defaultExpression = defaultExpression; } - public void setStaticExpressionElement(OAuth2StaticExpressions staticExpressionVoter) { - this.staticExpressionElement = staticExpressionVoter; + public String getScopeExpression() { + return scopeExpression; } - public OAuth2DynamicExpressions getDynamicExpressionElement() { - return dynamicExpressionElement; + public void setScopeExpression(String scopeExpression) { + this.scopeExpression = scopeExpression; } - public void setDynamicExpressionElement(OAuth2DynamicExpressions dynamicExpressionVoter) { - this.dynamicExpressionElement = dynamicExpressionVoter; + public OAuth2StaticExpressions getStaticExpression() { + return staticExpression; } - public String getScopeExpressionElement() { - return scopeExpressionElement; + public void setStaticExpression(OAuth2StaticExpressions staticExpression) { + this.staticExpression = staticExpression; } - public void setScopeExpressionElement(String scopeExpressionElement) { - this.scopeExpressionElement = scopeExpressionElement; + public OAuth2DynamicExpressions getDynamicExpression() { + return dynamicExpression; } - @Override - public String getDefaultExpression() { - return this.getDefaultExpressionElement(); + public void setDynamicExpression(OAuth2DynamicExpressions dynamicExpression) { + this.dynamicExpression = dynamicExpression; } - @Override - public String getStaticExpression() { - if (ObjectUtils.isNotEmpty(this.getStaticExpressionElement())) { - return this.getStaticExpressionElement().getExpressionContent(); - } - return null; + public OAuth2IpAddresses getIpExpression() { + return ipExpression; } - @Override - public String getDynamicExpression() { - if (ObjectUtils.isNotEmpty(this.getDynamicExpressionElement())) { - return this.getDynamicExpressionElement().getExpressionContent(); - } - return null; + public void setIpExpression(OAuth2IpAddresses ipExpression) { + this.ipExpression = ipExpression; } - @Override - public String getScopeExpression() { - return this.getScopeExpressionElement(); - } - - @Override public Set getRoles() { return roles; } @@ -231,28 +208,26 @@ public void setRoles(Set roles) { this.roles = roles; } - @Override public Set getScopes() { return scopes; } - @Override - public String getIpExpression() { - if (ObjectUtils.isNotEmpty(this.getIpExpressionElement())) { - return this.getIpExpressionElement().getIpAddress(); - } - return null; - } - public void setScopes(Set scopes) { this.scopes = scopes; } - public OAuth2IpAddresses getIpExpressionElement() { - return ipExpressionElement; - } - - public void setIpExpressionElement(OAuth2IpAddresses ipAddress) { - this.ipExpressionElement = ipAddress; + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("metadataId", metadataId) + .add("url", url) + .add("requestMethod", requestMethod) + .add("serviceId", serviceId) + .add("defaultExpression", defaultExpression) + .add("scopeExpression", scopeExpression) + .add("staticExpression", staticExpression) + .add("dynamicExpression", dynamicExpression) + .add("ipExpression", ipExpression) + .toString(); } } diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/helper/UpmsHelper.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/helper/UpmsHelper.java index 011ebaf02..8b6ca10f6 100644 --- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/helper/UpmsHelper.java +++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/helper/UpmsHelper.java @@ -205,11 +205,11 @@ public static List convertSysAuthoritiesToSysMetadatas(CollectionDescription: 抽取基于SysAuthority关联关系的实体变更

+ * + * @author : gengwei.zheng + * @date : 2021/8/11 20:16 + */ +public abstract class AbstractRelationEntityListener implements ApplicationContextAware { + + private ApplicationContext applicationContext; + + private List before; + private List after; + + public ApplicationContext getApplicationContext() { + return applicationContext; + } + + public void setBefore(List before) { + this.before = before; + } + + public void setAfter(List after) { + this.after = after; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + protected List clone(Set sysAuthorities) { + if (CollectionUtils.isNotEmpty(sysAuthorities)) { + return sysAuthorities.stream().map(SysAuthority:: getAuthorityId).collect(Collectors.toList()); + } + return new ArrayList<>(); + } + + protected List getChangedAuthority() { + if (CollectionUtils.isNotEmpty(this.before) && CollectionUtils.isNotEmpty(this.after)) { + return new ArrayList<>(CollectionUtils.disjunction(this.before, this.after)); + } + + if (CollectionUtils.isNotEmpty(this.before) && CollectionUtils.isEmpty(this.after)) { + return this.before; + } + + if (CollectionUtils.isEmpty(this.before) && CollectionUtils.isNotEmpty(this.after)) { + return this.after; + } + + return new ArrayList<>(); + } +} diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysRoleEntityListener.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysRoleEntityListener.java index 8421c00d1..e7f2b6412 100644 --- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysRoleEntityListener.java +++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysRoleEntityListener.java @@ -33,12 +33,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import javax.persistence.PostLoad; import javax.persistence.PostRemove; import javax.persistence.PostUpdate; import javax.persistence.PreUpdate; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; +import java.util.*; /** *

Description: SysRole实体变更监听

@@ -46,70 +45,40 @@ * @author : gengwei.zheng * @date : 2021/8/5 17:21 */ -public class SysRoleEntityListener implements ApplicationContextAware { +public class SysRoleEntityListener extends AbstractRelationEntityListener { private static final Logger log = LoggerFactory.getLogger(SysRoleEntityListener.class); - private ApplicationContext applicationContext; - - private SysRole preSysRole; - private SysRole postSysRole; + private List clone(SysRole sysRole) { + if (ObjectUtils.isNotEmpty(sysRole)) { + return this.clone(sysRole.getAuthorities()); + } + return new ArrayList<>(); + } - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; + @PostLoad + protected void postLoad(SysRole entity) { + log.debug("[Eurynome] |- SysRoleEntityListener @PostLoad : [{}]", entity.toString()); + this.setBefore(clone(entity)); } @PreUpdate protected void preUpdate(SysRole entity) { - log.trace("[Eurynome] |- SysRoleEntityListener @PreUpdate : [{}]", entity.toString()); - this.preSysRole = entity; + log.debug("[Eurynome] |- SysRoleEntityListener @PreUpdate actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); + this.setAfter(clone(entity)); } @PostUpdate protected void postUpdate(SysRole entity) { - log.trace("[Eurynome] |- SysRoleEntityListener @PostUpdate : [{}]", entity.toString()); - this.postSysRole = entity; - this.applicationContext.publishEvent(new SysMetadataRelationChangeEvent(this.getChangedAuthority())); + log.debug("[Eurynome] |- SysRoleEntityListener @PostUpdate actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); + this.getApplicationContext().publishEvent(new SysMetadataRelationChangeEvent(this.getChangedAuthority())); } @PostRemove protected void postRemove(SysRole entity) { - log.trace("[Eurynome] |- BaseEntityListener @PostRemove : [{}]", entity.toString()); + log.debug("[Eurynome] |- SysRoleEntityListener @PostRemove actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); if (CollectionUtils.isNotEmpty(entity.getAuthorities())) { - this.applicationContext.publishEvent(new SysMetadataRelationChangeEvent(entity.getAuthorities())); - } - } - - private Set getPostAuthorities() { - if (ObjectUtils.isNotEmpty(this.postSysRole)) { - return this.postSysRole.getAuthorities(); - } - return null; - } - - private Set getPreAuthorities() { - if (ObjectUtils.isNotEmpty(this.preSysRole)) { - return this.preSysRole.getAuthorities(); + this.getApplicationContext().publishEvent(new SysMetadataRelationChangeEvent(clone(entity))); } - return null; - } - - private Collection getChangedAuthority() { - Set preAuthorities = this.getPreAuthorities(); - Set postAuthorities = this.getPostAuthorities(); - if (CollectionUtils.isNotEmpty(preAuthorities) && CollectionUtils.isNotEmpty(postAuthorities)) { - return CollectionUtils.disjunction(preAuthorities, postAuthorities); - } - - if (CollectionUtils.isNotEmpty(preAuthorities) && CollectionUtils.isEmpty(postAuthorities)) { - return preAuthorities; - } - - if (CollectionUtils.isEmpty(preAuthorities) && CollectionUtils.isNotEmpty(postAuthorities)) { - return postAuthorities; - } - - return new HashSet<>(); } } diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysScopeEntityListener.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysScopeEntityListener.java index 244db66b3..21b067f8b 100644 --- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysScopeEntityListener.java +++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/entity/SysScopeEntityListener.java @@ -24,6 +24,7 @@ import cn.herodotus.eurynome.upms.api.entity.oauth.OAuth2Scopes; import cn.herodotus.eurynome.upms.api.entity.system.SysAuthority; +import cn.herodotus.eurynome.upms.api.entity.system.SysRole; import cn.herodotus.eurynome.upms.api.listener.event.SysMetadataRelationChangeEvent; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; @@ -33,12 +34,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import javax.persistence.PostLoad; import javax.persistence.PostRemove; import javax.persistence.PostUpdate; import javax.persistence.PreUpdate; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; +import java.util.*; /** *

Description: SysScope实体数据变更监听器

@@ -46,70 +46,40 @@ * @author : gengwei.zheng * @date : 2021/8/5 17:21 */ -public class SysScopeEntityListener implements ApplicationContextAware { +public class SysScopeEntityListener extends AbstractRelationEntityListener { private static final Logger log = LoggerFactory.getLogger(SysScopeEntityListener.class); - private ApplicationContext applicationContext; - - private OAuth2Scopes preOAuth2Scopes; - private OAuth2Scopes postOAuth2Scopes; + private List clone(OAuth2Scopes oAuth2Scopes) { + if (ObjectUtils.isNotEmpty(oAuth2Scopes)) { + return this.clone(oAuth2Scopes.getAuthorities()); + } + return new ArrayList<>(); + } - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; + @PostLoad + protected void postLoad(OAuth2Scopes entity) { + log.debug("[Eurynome] |- SysScopeEntityListener @PostLoad : [{}]", entity.toString()); + this.setBefore(clone(entity)); } @PreUpdate protected void preUpdate(OAuth2Scopes entity) { - log.trace("[Eurynome] |- SysScopeEntityListener @PreUpdate : [{}]", entity.toString()); - this.preOAuth2Scopes = entity; + log.debug("[Eurynome] |- SysScopeEntityListener @PreUpdate actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); + this.setAfter(clone(entity)); } @PostUpdate protected void postUpdate(OAuth2Scopes entity) { - log.trace("[Eurynome] |- SysScopeEntityListener @PostUpdate : [{}]", entity.toString()); - this.postOAuth2Scopes = entity; - this.applicationContext.publishEvent(new SysMetadataRelationChangeEvent(this.getChangedAuthority())); + log.debug("[Eurynome] |- SysScopeEntityListener @PostUpdate actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); + this.getApplicationContext().publishEvent(new SysMetadataRelationChangeEvent(this.getChangedAuthority())); } @PostRemove protected void postRemove(OAuth2Scopes entity) { - log.trace("[Eurynome] |- SysScopeEntityListener @PostRemove : [{}]", entity.toString()); + log.debug("[Eurynome] |- SysScopeEntityListener @PostRemove actived, value is : [{}]. Trigger SysMetadata relation change event.", entity.toString()); if (CollectionUtils.isNotEmpty(entity.getAuthorities())) { - this.applicationContext.publishEvent(new SysMetadataRelationChangeEvent(entity.getAuthorities())); - } - } - - private Set getPostAuthorities() { - if (ObjectUtils.isNotEmpty(this.postOAuth2Scopes)) { - return this.postOAuth2Scopes.getAuthorities(); - } - return null; - } - - private Set getPreAuthorities() { - if (ObjectUtils.isNotEmpty(this.preOAuth2Scopes)) { - return this.preOAuth2Scopes.getAuthorities(); + this.getApplicationContext().publishEvent(new SysMetadataRelationChangeEvent(clone(entity))); } - return null; - } - - private Collection getChangedAuthority() { - Set preAuthorities = this.getPreAuthorities(); - Set postAuthorities = this.getPostAuthorities(); - if (CollectionUtils.isNotEmpty(preAuthorities) && CollectionUtils.isNotEmpty(postAuthorities)) { - return CollectionUtils.disjunction(preAuthorities, postAuthorities); - } - - if (CollectionUtils.isNotEmpty(preAuthorities) && CollectionUtils.isEmpty(postAuthorities)) { - return preAuthorities; - } - - if (CollectionUtils.isEmpty(preAuthorities) && CollectionUtils.isNotEmpty(postAuthorities)) { - return postAuthorities; - } - - return new HashSet<>(); } } diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/event/SysMetadataRelationChangeEvent.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/event/SysMetadataRelationChangeEvent.java index e85b73448..a6bad0f1d 100644 --- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/event/SysMetadataRelationChangeEvent.java +++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/listener/event/SysMetadataRelationChangeEvent.java @@ -26,6 +26,7 @@ import org.springframework.context.ApplicationEvent; import java.util.Collection; +import java.util.List; /** *

Description: SysMetadata关联数据变更Event

@@ -35,15 +36,14 @@ */ public class SysMetadataRelationChangeEvent extends ApplicationEvent { - private final Collection changedAuthorities; + private final List changedAuthorities; - public SysMetadataRelationChangeEvent(Collection changedAuthorities) { + public SysMetadataRelationChangeEvent(List changedAuthorities) { super(changedAuthorities); this.changedAuthorities = changedAuthorities; - } - public Collection getChangedAuthorities() { + public List getChangedAuthorities() { return changedAuthorities; } } diff --git a/services/eurynome-cloud-upms-logic/pom.xml b/services/eurynome-cloud-upms-logic/pom.xml index 9ad75c69e..0743599f4 100644 --- a/services/eurynome-cloud-upms-logic/pom.xml +++ b/services/eurynome-cloud-upms-logic/pom.xml @@ -7,11 +7,11 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-upms-logic - 2.5.4.30 + 2.5.4.40 diff --git a/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/configuration/UpmsLogicConfiguration.java b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/configuration/UpmsLogicConfiguration.java index 196f55f40..5b04e63d7 100644 --- a/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/configuration/UpmsLogicConfiguration.java +++ b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/configuration/UpmsLogicConfiguration.java @@ -62,6 +62,8 @@ "cn.herodotus.eurynome.upms.logic.service.system", "cn.herodotus.eurynome.upms.logic.service.oauth", "cn.herodotus.eurynome.upms.logic.service.development", + "cn.herodotus.eurynome.upms.logic.listener", + "cn.herodotus.eurynome.upms.logic.processor", }) @EnableJpaRepositories(basePackages = { "cn.herodotus.eurynome.upms.logic.repository.system", diff --git a/services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/listener/RemoteRequestMappingGatherListener.java b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/listener/RemoteRequestMappingGatherListener.java similarity index 95% rename from services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/listener/RemoteRequestMappingGatherListener.java rename to services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/listener/RemoteRequestMappingGatherListener.java index 12cc45f21..b66074d03 100644 --- a/services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/listener/RemoteRequestMappingGatherListener.java +++ b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/listener/RemoteRequestMappingGatherListener.java @@ -20,11 +20,11 @@ * Date: 2021/08/07 20:49:07 */ -package cn.herodotus.eurynome.upms.ability.listener; +package cn.herodotus.eurynome.upms.logic.listener; import cn.herodotus.eurynome.security.definition.domain.RequestMapping; import cn.herodotus.eurynome.security.event.remote.RemoteRequestMappingGatherEvent; -import cn.herodotus.eurynome.upms.ability.processor.RequestMappingStoreProcessor; +import cn.herodotus.eurynome.upms.logic.processor.RequestMappingStoreProcessor; import com.alibaba.fastjson.JSON; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; diff --git a/services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/processor/RequestMappingStoreProcessor.java b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/processor/RequestMappingStoreProcessor.java similarity index 97% rename from services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/processor/RequestMappingStoreProcessor.java rename to services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/processor/RequestMappingStoreProcessor.java index 85ed84a21..05484e61e 100644 --- a/services/eurynome-cloud-upms-ability/src/main/java/cn/herodotus/eurynome/upms/ability/processor/RequestMappingStoreProcessor.java +++ b/services/eurynome-cloud-upms-logic/src/main/java/cn/herodotus/eurynome/upms/logic/processor/RequestMappingStoreProcessor.java @@ -20,7 +20,7 @@ * Date: 2021/08/07 20:50:07 */ -package cn.herodotus.eurynome.upms.ability.processor; +package cn.herodotus.eurynome.upms.logic.processor; import cn.herodotus.eurynome.security.definition.domain.RequestMapping; import cn.herodotus.eurynome.upms.api.entity.system.SysAuthority; diff --git a/services/eurynome-cloud-upms-rest/pom.xml b/services/eurynome-cloud-upms-rest/pom.xml index 93009d79a..6ef11f89e 100644 --- a/services/eurynome-cloud-upms-rest/pom.xml +++ b/services/eurynome-cloud-upms-rest/pom.xml @@ -6,11 +6,11 @@ services cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 eurynome-cloud-upms-rest - 2.5.4.30 + 2.5.4.40 eurynome-cloud-upms-rest 通用权限,人员信息服务供应商 diff --git a/services/pom.xml b/services/pom.xml index d9323b2b5..46549ddd3 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -31,7 +31,7 @@ eurynome-cloud cn.herodotus.eurynome - 2.5.4.30 + 2.5.4.40 services