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