diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index c85cafded..908574eb3 100644
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -67,6 +67,7 @@
0.36.1
5.0.0
+ 1.4.2.Final
4.4
@@ -300,6 +301,12 @@
knife4j-spring-ui
${knife4j.version}
+
+
+ org.mapstruct
+ mapstruct-processor
+ ${mapstruct-processor.version}
+
diff --git a/documents/readme/logo.jpg b/documents/readme/logo.jpg
index b82eba76a..9395a5e92 100644
Binary files a/documents/readme/logo.jpg and b/documents/readme/logo.jpg differ
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
index 767dff272..5c7002f90 100644
--- 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
@@ -36,6 +36,6 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
-@ConditionalOnProperty(value = PropertyConstants.ITEM_PLATFORM_KAFKA_ENABLED)
+@ConditionalOnProperty(value = PropertyConstants.ITEM_MANAGEMENT_KAFKA_ENABLED)
public @interface ConditionalOnKafkaEnabled {
}
diff --git a/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnLogCenterEnabled.java b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnLogCenterEnabled.java
index 72ddca240..807000bdd 100644
--- a/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnLogCenterEnabled.java
+++ b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnLogCenterEnabled.java
@@ -22,6 +22,7 @@
package cn.herodotus.eurynome.assistant.annotation;
+import cn.herodotus.eurynome.common.constant.magic.PropertyConstants;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.lang.annotation.*;
@@ -35,6 +36,6 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
-@ConditionalOnProperty(name = "herodotus.platform.management.log-center.server-addr")
+@ConditionalOnProperty(name = PropertyConstants.ITEM_MANAGEMENT_LOG_CENTER_ENABLED)
public @interface ConditionalOnLogCenterEnabled {
}
diff --git a/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnSwaggerEnabled.java b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnSwaggerEnabled.java
new file mode 100644
index 000000000..0e9f82f4a
--- /dev/null
+++ b/packages/eurynome-cloud-assistant/src/main/java/cn/herodotus/eurynome/assistant/annotation/ConditionalOnSwaggerEnabled.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: ConditionalOnSwaggerEnabled.java
+ * Author: gengwei.zheng
+ * Date: 2021/08/20 11:36:20
+ */
+
+package cn.herodotus.eurynome.assistant.annotation;
+
+import cn.herodotus.eurynome.common.constant.magic.PropertyConstants;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+
+import java.lang.annotation.*;
+
+/**
+ *
Description: Swagger条件开启主机
+ *
+ * @author : gengwei.zheng
+ * @date : 2021/8/20 11:36
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Documented
+@ConditionalOnProperty(value = PropertyConstants.ITEM_PLATFORM_SWAGGER_ENABLED, havingValue = "true", matchIfMissing = true)
+public @interface ConditionalOnSwaggerEnabled {
+}
diff --git a/packages/eurynome-cloud-common/src/main/java/cn/herodotus/eurynome/common/constant/magic/PropertyConstants.java b/packages/eurynome-cloud-common/src/main/java/cn/herodotus/eurynome/common/constant/magic/PropertyConstants.java
index 4ac68c001..56a02d196 100644
--- a/packages/eurynome-cloud-common/src/main/java/cn/herodotus/eurynome/common/constant/magic/PropertyConstants.java
+++ b/packages/eurynome-cloud-common/src/main/java/cn/herodotus/eurynome/common/constant/magic/PropertyConstants.java
@@ -40,9 +40,11 @@ public class PropertyConstants {
public static final String PROPERTY_PREFIX_CACHE = PROPERTY_PREFIX_PLATFORM + ".cache";
public static final String PROPERTY_PREFIX_REST = PROPERTY_PREFIX_PLATFORM + ".rest";
public static final String PROPERTY_PREFIX_SECURITY = PROPERTY_PREFIX_PLATFORM + ".security";
+ public static final String PROPERTY_PREFIX_SWAGGER = PROPERTY_PREFIX_PLATFORM + ".swagger";
public static final String PROPERTY_PREFIX_MANAGEMENT_NACOS = PROPERTY_PREFIX_MANAGEMENT + ".nacos";
public static final String PROPERTY_PREFIX_MANAGEMENT_QUEUE = PROPERTY_PREFIX_MANAGEMENT + ".queue";
+ public static final String PROPERTY_PREFIX_MANAGEMENT_LOG_CENTER = PROPERTY_PREFIX_MANAGEMENT + ".log-center";
public static final String PROPERTY_PREFIX_MANAGEMENT_SERVICE = PROPERTY_PREFIX_MANAGEMENT + ".service";
public static final String PROPERTY_PREFIX_SOCIAL_JUSTAUTH = PROPERTY_PREFIX_SOCIAL + ".justauth";
@@ -59,13 +61,16 @@ public class PropertyConstants {
public static final String PROPERTY_PREFIX_AUDIT_BAIDU = PROPERTY_PREFIX_AUDIT + ".baidu";
public static final String PROPERTY_PREFIX_AUDIT_TIANYAN = PROPERTY_PREFIX_AUDIT + ".tianyan";
-
public static final String ITEM_SPRING_APPLICATION_NAME = "spring.application.name";
public static final String ITEM_SPRING_JPA_HIBERNATE_DDL_AUTO = "spring.jpa.hibernate.ddl-auto";
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 ITEM_PLATFORM_SWAGGER_ENABLED = PROPERTY_PREFIX_SWAGGER + ".enabled";
+
+ public static final String ITEM_MANAGEMENT_KAFKA_ENABLED = PROPERTY_PREFIX_MANAGEMENT_QUEUE + ".kafka.enabled";
+ public static final String ITEM_MANAGEMENT_LOG_CENTER_ENABLED = PROPERTY_PREFIX_MANAGEMENT_LOG_CENTER + ".server-addr";
+ public static final String ANNOTATION_APPLICATION_NAME = "${" + ITEM_SPRING_APPLICATION_NAME + "}";
public static final String ANNOTATION_DEBEZIUM_ENABLED = "${herodotus.platform.debezium.enabled}";
}
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 dcb323a78..f6c1c6184 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
@@ -24,12 +24,14 @@
import cn.herodotus.eurynome.data.cache.layer.HerodotusCacheManager;
import cn.herodotus.eurynome.data.properties.CacheProperties;
+import cn.herodotus.eurynome.data.properties.QueueProperties;
import cn.hutool.extra.spring.SpringUtil;
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;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -67,7 +69,12 @@
@Configuration(proxyBeanMethods = false)
@EnableJpaAuditing
@AutoConfigureAfter(JpaRepositoriesAutoConfiguration.class)
-@Import({SpringUtil.class, CaffeineConfiguration.class, KafkaConfiguration.class})
+@EnableConfigurationProperties({QueueProperties.class})
+@Import({
+ SpringUtil.class,
+ CaffeineConfiguration.class,
+ KafkaConfiguration.class
+})
public class DataConfiguration {
private static final Logger log = LoggerFactory.getLogger(DataConfiguration.class);
diff --git a/packages/eurynome-cloud-kernel/pom.xml b/packages/eurynome-cloud-kernel/pom.xml
index 34a4ce066..1f05aa8b5 100644
--- a/packages/eurynome-cloud-kernel/pom.xml
+++ b/packages/eurynome-cloud-kernel/pom.xml
@@ -41,7 +41,7 @@
${project.groupId}
- eurynome-cloud-common
+ eurynome-cloud-assistant
diff --git a/packages/eurynome-cloud-kernel/src/main/java/cn/herodotus/eurynome/kernel/configuration/LogstashConfiguration.java b/packages/eurynome-cloud-kernel/src/main/java/cn/herodotus/eurynome/kernel/configuration/LogstashConfiguration.java
index ed0495ba3..8ed7c4591 100644
--- a/packages/eurynome-cloud-kernel/src/main/java/cn/herodotus/eurynome/kernel/configuration/LogstashConfiguration.java
+++ b/packages/eurynome-cloud-kernel/src/main/java/cn/herodotus/eurynome/kernel/configuration/LogstashConfiguration.java
@@ -26,6 +26,8 @@
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
+import cn.herodotus.eurynome.assistant.annotation.ConditionalOnLogCenterEnabled;
+import cn.herodotus.eurynome.common.constant.magic.PropertyConstants;
import cn.herodotus.eurynome.kernel.logback.LogstashPattern;
import cn.herodotus.eurynome.kernel.properties.ManagementProperties;
import com.alibaba.fastjson.JSON;
@@ -39,7 +41,6 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.logging.LogLevel;
import org.springframework.context.annotation.Configuration;
@@ -63,10 +64,10 @@
@EnableConfigurationProperties({
ManagementProperties.class
})
-@ConditionalOnProperty(name = "herodotus.platform.management.log-center.server-addr")
+@ConditionalOnLogCenterEnabled
public class LogstashConfiguration {
- @Value("${spring.application.name}")
+ @Value(PropertyConstants.ANNOTATION_APPLICATION_NAME)
private String serviceName;
@Autowired
diff --git a/packages/eurynome-cloud-rest/src/main/java/cn/herodotus/eurynome/rest/configuration/SwaggerConfiguration.java b/packages/eurynome-cloud-rest/src/main/java/cn/herodotus/eurynome/rest/configuration/SwaggerConfiguration.java
index 2882ab0c3..3dd06186a 100644
--- a/packages/eurynome-cloud-rest/src/main/java/cn/herodotus/eurynome/rest/configuration/SwaggerConfiguration.java
+++ b/packages/eurynome-cloud-rest/src/main/java/cn/herodotus/eurynome/rest/configuration/SwaggerConfiguration.java
@@ -22,6 +22,7 @@
package cn.herodotus.eurynome.rest.configuration;
+import cn.herodotus.eurynome.assistant.annotation.ConditionalOnSwaggerEnabled;
import cn.herodotus.eurynome.common.constant.magic.SecurityConstants;
import cn.herodotus.eurynome.common.constant.enums.Architecture;
import cn.herodotus.eurynome.rest.properties.PlatformProperties;
@@ -56,7 +57,7 @@
*/
@Slf4j
@Configuration
-@ConditionalOnProperty(value = "herodotus.platform.swagger.enabled", havingValue = "true", matchIfMissing = true)
+@ConditionalOnSwaggerEnabled
@AutoConfigureAfter(ServiceConfiguration.class)
@EnableSwagger2
public class SwaggerConfiguration {
diff --git a/pom.xml b/pom.xml
index 3c4a24607..2df1e4138 100644
--- a/pom.xml
+++ b/pom.xml
@@ -244,6 +244,24 @@
${java.version}
${project.build.sourceEncoding}
+ true
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+
+
+ org.mapstruct
+ mapstruct-processor
+ ${mapstruct-processor.version}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot-dependencies.version}
+
+
diff --git a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdGroupProcessor.java b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdGroupProcessor.java
index 097c8f077..be2f5388f 100644
--- a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdGroupProcessor.java
+++ b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdGroupProcessor.java
@@ -48,7 +48,7 @@ public ActIdGroupProcessor(ActIdGroupService actIdGroupService) {
this.actIdGroupService = actIdGroupService;
}
- @KafkaListener(topics = {"herodotus.public.sys_department"}, groupId = "herodotus.debezium")
+ @KafkaListener(topics = {"herodotus.public.sys_department"}, groupId = "herodotus.debezium", containerFactory = "concurrentKafkaListenerContainerFactory")
public void received(String body) {
log.info("[Eurynome] |- Recived Debezium event message from [sys_department], content is : [{}]", body);
this.execute(body);
diff --git a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdMembershipProcessor.java b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdMembershipProcessor.java
index 7e5980440..9afd2dded 100644
--- a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdMembershipProcessor.java
+++ b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdMembershipProcessor.java
@@ -48,7 +48,7 @@ public ActIdMembershipProcessor(ActIdMembershipService actIdMembershipService) {
this.actIdMembershipService = actIdMembershipService;
}
- @KafkaListener(topics = {"herodotus.public.sys_employee_department"}, groupId = "herodotus.debezium")
+ @KafkaListener(topics = {"herodotus.public.sys_employee_department"}, groupId = "herodotus.debezium", containerFactory = "concurrentKafkaListenerContainerFactory")
public void received(String body) {
log.info("[Eurynome] |- Recived Debezium event message from [sys_employee_department], content is : [{}]", body);
this.execute(body);
diff --git a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantMemberProcessor.java b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantMemberProcessor.java
index cb31bb4af..53040aca4 100644
--- a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantMemberProcessor.java
+++ b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantMemberProcessor.java
@@ -48,7 +48,7 @@ public ActIdTenantMemberProcessor(ActIdTenantMemberService actIdTenantMemberServ
this.actIdTenantMemberService = actIdTenantMemberService;
}
- @KafkaListener(topics = {"herodotus.public.sys_ownership"}, groupId = "herodotus.debezium")
+ @KafkaListener(topics = {"herodotus.public.sys_ownership"}, groupId = "herodotus.debezium", containerFactory = "concurrentKafkaListenerContainerFactory")
public void received(String body) {
log.info("[Eurynome] |- Recived Debezium event message from [sys_ownership], content is : [{}]", body);
this.execute(body);
diff --git a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantProcessor.java b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantProcessor.java
index 44ae88dd2..488c36789 100644
--- a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantProcessor.java
+++ b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdTenantProcessor.java
@@ -48,7 +48,7 @@ public ActIdTenantProcessor(ActIdTenantService actIdTenantService) {
this.actIdTenantService = actIdTenantService;
}
- @KafkaListener(topics = {"herodotus.public.sys_department"}, groupId = "herodotus.debezium")
+ @KafkaListener(topics = {"herodotus.public.sys_department"}, groupId = "herodotus.debezium", containerFactory = "concurrentKafkaListenerContainerFactory")
public void received(String body) {
log.info("[Eurynome] |- Recived Debezium event message from [sys_department], content is : [{}]", body);
this.execute(body);
diff --git a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdUserProcessor.java b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdUserProcessor.java
index 7245ae59d..1b0175642 100644
--- a/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdUserProcessor.java
+++ b/services/eurynome-cloud-bpmn-rest/src/main/java/cn/herodotus/eurynome/bpmn/rest/processor/ActIdUserProcessor.java
@@ -48,7 +48,7 @@ public ActIdUserProcessor(ActIdUserService actIdUserService) {
this.actIdUserService = actIdUserService;
}
- @KafkaListener(topics = {"herodotus.public.sys_employee"}, groupId = "herodotus.debezium")
+ @KafkaListener(topics = {"herodotus.public.sys_employee"}, groupId = "herodotus.debezium", containerFactory = "concurrentKafkaListenerContainerFactory")
public void received(String body) {
log.info("[Eurynome] |- Recived Debezium event message from [sys_employee], content is : [{}]", body);
this.execute(body);
diff --git a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysSecurityAttribute.java b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysSecurityAttribute.java
index a981b0da3..aa7039619 100644
--- a/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysSecurityAttribute.java
+++ b/services/eurynome-cloud-upms-api/src/main/java/cn/herodotus/eurynome/upms/api/entity/system/SysSecurityAttribute.java
@@ -55,7 +55,7 @@ public class SysSecurityAttribute extends BaseSysEntity {
@ApiModelProperty(value = "元数据ID")
@Id
@GeneratedValue(generator = "metadata-uuid")
- @GenericGenerator(name = "metadata-uuid", strategy = "cn.herodotus.cloud.upms.api.generator.SysSecurityAttributeUUIDGenerator")
+ @GenericGenerator(name = "metadata-uuid", strategy = "cn.herodotus.eurynome.upms.api.generator.SysSecurityAttributeUUIDGenerator")
@Column(name = "attribute_id", length = 64)
private String attributeId;