diff --git a/README.md b/README.md
index f7302aaac84278633dbbc93d6630ac530e3f9bca..b1e44bf24f9c24af9dc977101a0ac8b6043cd55b 100644
--- a/README.md
+++ b/README.md
@@ -13,9 +13,9 @@
-
-
-
+
+
+
@@ -61,6 +61,7 @@ Dante Cloud 并未使用任何复杂难懂或难以上手掌握的技术,项
- **数字转型用户**:如果您的业务复杂度上升到一定阶段、或者您正在考虑进行数字化转型,可以直接选择使用微服务版本,不用再为“基础组件碎片化,需花大量时间整合、踩坑版本兼容”等问题而苦恼。
- **复杂项目用户**:可以直接选择微服务版本,节省大量前期搭建基础设施、解决通用技术问题的时间,直接聚焦于业务开发。
- **初创团队用户**:可以先使用单体版进行开发,只要代码放置规范、模块划分合理,后期可以根据需要无缝迁移至微服务架构
+- **技术尝鲜用户**:项目使用中力争生态圈中较新的技术或者组件,而不拘泥局限于常规成熟的技术内容,目标是探索新型技术并用其来为业务的创新服务。喜欢技术尝鲜的用户可以尝鲜使用。
- **学习提升用户**:本项目集成了成熟的技术选型、优雅的代码设计和清晰的领域划分,编码风格和代码设计一直也在极尽努力尽量与 Spring 生态的标准规范用法保持一致,是深入学习掌握 Spring 生态各组件的优秀案例
> 想要从传统项目转型至微服务项目的用户,**建议详细阅读《企业IT架构转型之道:阿里巴巴中台战略思想与架构实战》一书(可以先读前几章)之后再上手本项目!**
@@ -116,23 +117,24 @@ Dante Cloud 已通过由第三方进行的软件出厂安全测试以及等保
## [5]、工程结构
-```
+### 1. 主工程结构
+
+```shell
dante-cloud
├── configurations -- 配置文件脚本和统一Docker build上下文目录
├── dependencies -- 工程Maven顶级依赖,统一控制版本和依赖
-├── module -- 依赖组件半成品拼装工程
+├── module -- 依赖组件半成品拼装工程(可以再此建立业务代码模块,以模块的形式实现代码的共享以及架构的切换)
├ ├── dante-module-common -- Module 相关模块公共辅助代码模块
-├ ├── dante-module-metadata -- 权限元数据同步模块
-├ ├── dante-module-social -- 社交登录模块
-├ ├── dante-module-strategy -- UAA 核心数据访问策略模块
├ └── dante-monomer-autoconfigure -- 单体版自动配置模块
├── packages -- 基础核心Starter
-├ ├── authorization-spring-boot-starter -- OAuth2 认证基础Starter,主要用于 UAA 认证服务器以及单体版 Dante Cloud
-├ ├── facility-spring-boot-starter -- 基础设施切换依赖starter
-├ └── service-spring-boot-starter -- 平台接入应用服务通用 Starter
+├ ├── authentication-spring-boot-starter -- OAuth2 授权服务器自动配置 Starter(主要用于 UAA 认证服务器以及单体版 Dante Cloud)
+├ ├── authorization-servlet-spring-boot-starter -- 阻塞式 OAuth2 资源服务器自动配置 Starter(除了 Monitor 等特殊服务以外,所有服务均需依赖)
+├ ├── facility-spring-boot-starter -- 基础设施切换依赖 Starter
+├ ├── rpc-client-uaa-spring-boot-starter -- 服务间通信客户端自动配置 Starter(UAA 作为客户端端访问其它服务)
+├ └── rpc-server-upms-spring-boot-starter -- 服务间通信服务端自动配置 Starter(UPMS 作为服务端为其它服务提供访问)
├── platform -- 平台核心服务
-├ ├── dante-cloud-gateway -- 服务网关
-├ ├── dante-cloud-message -- 消息服务
+├ ├── dante-cloud-gateway -- 统一网关服务
+├ ├── dante-cloud-message -- 系统消息服务
├ ├── dante-cloud-monitor -- Spring Boot Admin 监控服务
├ ├── dante-cloud-upms -- 统一权限管理系统服务
├ └── dante-cloud-uaa -- 账户管理和统一认证模块
@@ -143,6 +145,73 @@ dante-cloud
└── └── dante-monomer-application -- Dante Cloud 单体版应用模块
```
+### 2. 组件库结构
+
+```shell
+dante-engine
+├── dependencies -- 工程 Maven 顶级依赖,统一控制版本和依赖
+├── engine-assistant -- 辅助功能模块
+├ ├── assistant-access -- 第三方登录接入辅助功能模块
+├ └── assistant-captcha -- 验证码辅助功能模块
+├── engine-cache -- 缓存功能模块
+├ ├── cache-core -- 缓存通用代码模块
+├ ├── cache-module-caffeine -- Caffeine 缓存功能封装模块
+├ ├── cache-module-jetcache -- JetCache 缓存功能封装模块
+├ ├── cache-module-redis -- Redis 缓存功能封装模块
+├ └── cache-module-redisson -- Redisson 缓存功能封装模块
+├── engine-core -- 基础核心模块
+├ ├── core-autoconfigure -- 核心自动配置模块
+├ ├── core-definition -- 核心定义模块
+├ ├── core-foundation -- 基础通用模块
+├ └── core-identity -- 身份认证通用模块
+├── engine-data -- 数据访问模块
+├ ├── data-core -- 数据访问通用代码模块
+├ ├── data-core-jpa -- 以 JPA 作为数据访问层的通用代码模块
+├ ├── data-core-mongodb -- 以 MongoDB 作为数据访问层的通用代码模块
+├ ├── data-module-hibernate -- Hibernate 扩展模块
+├ └── data-module-tenant -- 基于 JPA 的多租户扩展配置模块
+├── engine-logic -- 系统内置功能业务逻辑模块
+├ ├── logic-module-identity -- 身份认证功能业务逻辑模块
+├ ├── logic-module-message -- 系统消息业务逻辑模块
+├ └── logic-module-upms -- UPMS 业务逻辑模块
+├── engine-message -- 消息模块
+├ ├── message-autoconfigure -- 消息自动配置模块
+├ ├── message-core -- 消息通用代码模块
+├ └── message-module-websocket-servlet -- 基于 Servlet 环境下的 Websocket 功能封装模块
+├── engine-oauth2 -- OAuth2 认证模块
+├ ├── oauth2-authentication-autoconfigure -- OAuth2 授权服务器基础内容自动配置模块
+├ ├── oauth2-authorization-autoconfigure -- OAuth2 资源服务器基础内容自动配置模块
+├ ├── oauth2-core -- OAuth2 共性通用代码模块
+├ ├── oauth2-module-authentication -- Spring Authorization Server 授权服务器核心功能封装模块
+├ ├── oauth2-module-authorization -- Spring Authorization Server 资源服务器核心功能封装模块
+├ ├── oauth2-module-extension -- Spring Authorization Server 功能扩展模块
+├ └── oauth2-module-persistence-jpa -- 以 JPA 作为 SAS 核心数据访问层代码实现模块
+├── engine-rest -- 系统内置功能 REST 接口模块
+├ ├── rest-module-servlet-identity -- 身份认证功能 Servlet 环境 REST 接口模块
+├ ├── rest-module-servlet-message -- 消息功能 Servlet 环境 REST 接口模块
+├ └── rest-module-servlet-upms -- UPMS 功能 Servlet 环境 REST 接口模块
+├── engine-starter -- Starters
+├ ├── cache-spring-boot-starter -- 缓存自动配置 Starter
+├ ├── captcha-spring-boot-starter -- 验证码自动配置 Starter
+├ ├── data-mongodb-spring-boot-starter -- MongoDB 数据访问层自动配置 Starter
+├ ├── data-rdbms-spring-boot-starter -- 关系型数据库数据访问层自动配置 Starter
+├ ├── facility-alibaba-spring-boot-starter -- 面向 Spring Cloud Alibaba 的微服务基础设施适配 Starter
+├ ├── facility-gateway-spring-boot-starter -- Alibaba Sentinel 在 Gateway 环境下基础设施适配 Starter
+├ ├── facility-kafka-spring-boot-starter -- 基于 Kafka 的消息事件自动配置 Starter
+├ ├── facility-tencent-spring-boot-starter -- 面向 Spring Cloud Tencent 的微服务基础设施适配模块 Starter
+├ ├── logging-spring-boot-starter -- 日志收集和聚合自动配置 Starter
+├ ├── reactive-container-spring-boot-starter -- Reactive 容器基础配置自动配置 Starter
+├ ├── servlet-container-spring-boot-starter -- Servlet 容器基础配置自动配置 Starter
+├ ├── servlet-message-spring-boot-starter -- Servlet 环境消息模块自动配置 Starter
+├ └── webmvc-spring-boot-starter -- WebMvc 类型应用自动配置 Starter
+├── engine-web -- Web 模块
+├ ├── web-core -- Web 通用代码模块
+├ ├── web-module-api -- Rest 接口通用代码模块
+├ ├── web-module-service -- 微服务通用代码模块
+├ └── web-module-servlet -- Servlet 环境 Web 服务专有基础代码模块
+└── readme -- README 相关素材放置目录
+```
+
## [6]、 版本和分支
### 一、版本号说明
diff --git a/configurations/backup/alibaba/3.5.5.3/nacos_config_export_20250910121145.zip b/configurations/backup/alibaba/3.5.5.3/nacos_config_export_20250910121145.zip
new file mode 100644
index 0000000000000000000000000000000000000000..0e261e64233a8ff2c628294069db89796d777853
Binary files /dev/null and b/configurations/backup/alibaba/3.5.5.3/nacos_config_export_20250910121145.zip differ
diff --git a/configurations/backup/yamls/common/dante-cloud-database-opengauss5.yaml b/configurations/backup/yamls/common/dante-cloud-database-opengauss6.yaml
similarity index 76%
rename from configurations/backup/yamls/common/dante-cloud-database-opengauss5.yaml
rename to configurations/backup/yamls/common/dante-cloud-database-opengauss6.yaml
index 4cb00906d24533046e2b1bf7e198dea766f181f3..c196969963566c92ad4f156758db23bc1aab6856 100644
--- a/configurations/backup/yamls/common/dante-cloud-database-opengauss5.yaml
+++ b/configurations/backup/yamls/common/dante-cloud-database-opengauss6.yaml
@@ -2,5 +2,5 @@ herodotus:
database-information:
platform: postgresql
driver-class-name: org.opengauss.Driver
- dialect: cn.herodotus.engine.data.jpa.hibernate.dialect.OpenGaussDialect
+ dialect: cn.herodotus.engine.data.hibernate.dialect.OpenGaussDialect
url: jdbc:opengauss://${herodotus.environment.database.host}:${herodotus.environment.database.port}/${herodotus.environment.database.name}
\ No newline at end of file
diff --git a/configurations/backup/yamls/common/dante-cloud-database.yaml b/configurations/backup/yamls/common/dante-cloud-database.yaml
index 224553b0a440e6848dc50595c52625e017b0e4c9..a48e7420611618e2681a78cfcd29e45adecd44a5 100644
--- a/configurations/backup/yamls/common/dante-cloud-database.yaml
+++ b/configurations/backup/yamls/common/dante-cloud-database.yaml
@@ -42,7 +42,7 @@ spring:
hibernate:
ddl-auto: ${herodotus.switch.database.ddl-auto}
naming:
- physical-strategy: cn.herodotus.engine.data.jpa.hibernate.HerodotusPhysicalNamingStrategy
+ physical-strategy: cn.herodotus.engine.data.hibernate.HerodotusPhysicalNamingStrategy
properties:
jakarta:
persistence:
@@ -61,7 +61,7 @@ spring:
use_second_level_cache: ${herodotus.switch.database.use-second-level-cache}
use_minimal_puts: true
region:
- factory_class: cn.herodotus.engine.data.jpa.hibernate.spi.cache.HerodotusRegionFactory
+ factory_class: cn.herodotus.engine.data.hibernate.spi.cache.HerodotusRegionFactory
jakarta:
cache:
missing_cache_strategy: create
diff --git a/configurations/backup/yamls/common/dante-cloud-platform.yaml b/configurations/backup/yamls/common/dante-cloud-platform.yaml
index 3e7f7069793136c8f529a9e4156fc4e88813502b..eb6fe1e730e1fc77fd0e1e4814ec0f81a2c0a45a 100644
--- a/configurations/backup/yamls/common/dante-cloud-platform.yaml
+++ b/configurations/backup/yamls/common/dante-cloud-platform.yaml
@@ -18,11 +18,13 @@ herodotus:
issuer-uri: ${herodotus.endpoint.uaa-service-uri}
oidc-client-registration-uri: ${herodotus.endpoint.uaa-service-uri}/connect/register
oidc-user-info-uri: ${herodotus.endpoint.uaa-service-uri}/userinfo
- swagger:
- enabled: ${herodotus.switch.swagger.enabled}
oauth2:
jwk:
certificate: standard
+ platform:
+ architecture: distributed
+ swagger:
+ enabled: ${herodotus.switch.swagger.enabled}
management:
endpoints:
@@ -37,6 +39,11 @@ management:
server:
shutdown: graceful
+ error:
+ include-exception: true
+ include-message: always
+ include-stacktrace: always
+ include-binding-errors: always
servlet:
session:
timeout: ${herodotus.session.timeout}
@@ -47,6 +54,9 @@ spring:
redis:
repository-type: indexed
flush-mode: immediate
+ thymeleaf:
+ mode: HTML
+ cache: false
sms:
is-print: false
\ No newline at end of file
diff --git a/configurations/backup/yamls/common/dante-cloud-rest.yaml b/configurations/backup/yamls/common/dante-cloud-rest.yaml
index cd32e425f8c3f9e7cbd8d5effa18be62138ce674..b271883bf9d1ef59f213dc68c5413e4c9ed3bc84 100644
--- a/configurations/backup/yamls/common/dante-cloud-rest.yaml
+++ b/configurations/backup/yamls/common/dante-cloud-rest.yaml
@@ -1,13 +1,4 @@
-server:
- error:
- include-exception: true
- include-message: always
- include-stacktrace: always
- include-binding-errors: always
spring:
- thymeleaf:
- mode: HTML
- cache: false
cloud:
openfeign:
okhttp:
@@ -55,9 +46,4 @@ springdoc:
show-extensions: true
oauth:
use-pkce-with-authorization-code-grant: true
- app-name: ${spring.application.name}
-
-herodotus:
- rest:
- scan:
- enabled: ${herodotus.switch.rest.scan.enabled}
\ No newline at end of file
+ app-name: ${spring.application.name}
\ No newline at end of file
diff --git a/configurations/backup/yamls/common/dante-cloud-social.yaml b/configurations/backup/yamls/common/dante-cloud-social.yaml
index 0d395e62988ca3a41c34be65acf14f3799439c03..e8cb5fee944fea5929b87eecfbab11e9da4221d0 100644
--- a/configurations/backup/yamls/common/dante-cloud-social.yaml
+++ b/configurations/backup/yamls/common/dante-cloud-social.yaml
@@ -1,22 +1,14 @@
herodotus:
- sms:
- enabled: true
- sandbox: true
- test-code: 123456
- default-channel: aliyun
- aliyun:
- enabled: true
- access-key-id: xxxxxx
- access-key-secret: xxxxxxx
- region-id: cn-shanghai
- sign-name: helloword
- version: 2017-05-25
- templates: { "VERIFICATION_CODE": "SMS_222222222" }
- access:
- justauth:
- enabled: true
- configs:
- GITEE:
- client-id: 7c1623d76f3909757912338688cae8a061e241b5607
- client-secret: 8c343cad9ca732d54242f002d254239e17b68ca
- redirect-uri: http://192.168.101.10:3000/social/oauth2/callback/GITEE
\ No newline at end of file
+ assistant:
+ access:
+ sms:
+ enabled: true
+ sandbox: true
+ test-code: 12345678
+ justauth:
+ enabled: true
+ configs:
+ GITEE:
+ client-id: 7c1623d76f3909757912338688cae8a061e241b5607
+ client-secret: 8c343cad9ca732d54242f002d254239e17b68ca
+ redirect-uri: http://192.168.101.10:3000/social/oauth2/callback/GITEE
\ No newline at end of file
diff --git a/configurations/backup/yamls/development/dante-cloud-environment.yaml b/configurations/backup/yamls/development/dante-cloud-environment.yaml
index 6cd0c459b619652de538a160ea56378b0763a6ce..14cb8406d7c7a757fc2910020117376bacf4b80c 100644
--- a/configurations/backup/yamls/development/dante-cloud-environment.yaml
+++ b/configurations/backup/yamls/development/dante-cloud-environment.yaml
@@ -1,6 +1,5 @@
herodotus:
environment:
- logstash-server-addr: false
gateway-server-addr: http://192.168.101.10:8847
database:
host: 127.0.0.1
@@ -25,21 +24,20 @@ herodotus:
generate-statistics: false
swagger:
enabled: true
- rest:
- scan:
- enabled: true
session:
timeout: 2h
- log-center:
- server-addr: ${herodotus.environment.logstash-server-addr}
+ log:
+ level: info
loggers:
- org.springframework.security: debug
- com.alibaba.nacos.client.naming: error
- com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty: error
- org.reflections.Reflections: off
- com.alibaba.nacos.client: error
- com.alibaba.nacos.common.remote.client: error
- com.ulisesbocchio: error
+ cn.herodotus: debug
+ com.alicp.jetcache: debug
+ org.springframework.security: info
+ org.springframework.web: debug
+ org.springframework.cloud.bus: info
+ org.apache.kafka: warn
+ logstash:
+ host: 127.0.0.1
+ port: 5044
jasypt:
encryptor:
diff --git a/configurations/backup/yamls/docker/dante-cloud-environment.yaml b/configurations/backup/yamls/docker/dante-cloud-environment.yaml
index 8ca5005d875ea187c11f4d0b22b0c46003aee2b8..dc01c896e7145120450f384f3adfaaed658d405b 100644
--- a/configurations/backup/yamls/docker/dante-cloud-environment.yaml
+++ b/configurations/backup/yamls/docker/dante-cloud-environment.yaml
@@ -1,6 +1,5 @@
herodotus:
environment:
- logstash-server-addr: 127.0.0.1:5044
gateway-server-addr: http://localhost:8847
database:
host: 127.0.0.1
@@ -25,21 +24,20 @@ herodotus:
generate-statistics: false
swagger:
enabled: true
- rest:
- scan:
- enabled: true
session:
timeout: 2h
- log-center:
- server-addr: ${herodotus.environment.logstash-server-addr}
+ log:
+ level: info
loggers:
- org.springframework.security: debug
- com.alibaba.nacos.client.naming: error
- com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty: error
- org.reflections.Reflections: off
- com.alibaba.nacos.client: error
- com.alibaba.nacos.common.remote.client: error
- com.ulisesbocchio: error
+ cn.herodotus: debug
+ com.alicp.jetcache: debug
+ org.springframework.security: info
+ org.springframework.web: debug
+ org.springframework.cloud.bus: info
+ org.apache.kafka: warn
+ logstash:
+ host: 127.0.0.1
+ port: 5044
jasypt:
encryptor:
diff --git a/configurations/backup/yamls/production/dante-cloud-environment.yaml b/configurations/backup/yamls/production/dante-cloud-environment.yaml
index 13ad327c76b8b8a4006df54520a2cd53752bd32e..e261e083dccaeb3a01789aea4586339841390821 100644
--- a/configurations/backup/yamls/production/dante-cloud-environment.yaml
+++ b/configurations/backup/yamls/production/dante-cloud-environment.yaml
@@ -1,6 +1,5 @@
herodotus:
environment:
- logstash-server-addr: false
gateway-server-addr: http://localhost:8847
database:
host: 127.0.0.1
@@ -25,21 +24,20 @@ herodotus:
generate-statistics: false
swagger:
enabled: true
- rest:
- scan:
- enabled: true
session:
timeout: 2h
- log-center:
- server-addr: ${herodotus.environment.logstash-server-addr}
+ log:
+ level: info
loggers:
- org.springframework.security: debug
- com.alibaba.nacos.client.naming: error
- com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty: error
- org.reflections.Reflections: off
- com.alibaba.nacos.client: error
- com.alibaba.nacos.common.remote.client: error
- com.ulisesbocchio: error
+ cn.herodotus: debug
+ com.alicp.jetcache: debug
+ org.springframework.security: info
+ org.springframework.web: debug
+ org.springframework.cloud.bus: info
+ org.apache.kafka: warn
+ logstash:
+ host: 127.0.0.1
+ port: 5044
platform:
cache:
diff --git a/configurations/docker/docker-compose/linux/herodotus/.env b/configurations/docker/docker-compose/linux/herodotus/.env
index 3c6a46ab8cd07ffb4a4818119a1758b89771944c..db24915384ac4eda43c57b6becff081d60f80fdf 100644
--- a/configurations/docker/docker-compose/linux/herodotus/.env
+++ b/configurations/docker/docker-compose/linux/herodotus/.env
@@ -1,4 +1,4 @@
-VERSION=3.5.5.2
+VERSION=3.5.5.3
SPRING_PROFILES_ACTIVE=alibaba
PROFILE=development
DATABASE=postgresql
diff --git a/configurations/docker/docker-compose/windows/herodotus/.env b/configurations/docker/docker-compose/windows/herodotus/.env
index 75d96de83b69af2129c3f757e888b03aa7ecbd3f..80e51cbf66979dc7fecb03a1cc6e267fafee9ec3 100644
--- a/configurations/docker/docker-compose/windows/herodotus/.env
+++ b/configurations/docker/docker-compose/windows/herodotus/.env
@@ -1,4 +1,4 @@
-VERSION=3.5.5.2
+VERSION=3.5.5.3
SPRING_PROFILES_ACTIVE=alibaba
PROFILE=development
DATABASE=postgresql
diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index f59fbf5235de7197c15f7e5e0209d8756e8f2a3d..26658a11b13523e58c7981691559c58d6e90d719 100644
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -28,7 +28,7 @@
cn.herodotus.engine
dependencies
- 3.5.5.2
+ 3.5.5.3
@@ -84,11 +84,6 @@
dante-module-common
${project.version}
-
- org.dromara.dante
- dante-module-strategy
- ${project.version}
-
org.dromara.dante
authentication-spring-boot-starter
@@ -96,7 +91,7 @@
org.dromara.dante
- service-spring-boot-starter
+ authorization-servlet-spring-boot-starter
${project.version}
@@ -104,17 +99,17 @@
facility-spring-boot-starter
${project.version}
-
org.dromara.dante
- dante-module-social
+ rpc-client-uaa-spring-boot-starter
${project.version}
org.dromara.dante
- dante-module-metadata
+ rpc-server-upms-spring-boot-starter
${project.version}
+
org.dromara.dante
dante-cloud-bpmn-logic
diff --git a/modules/dante-module-common/pom.xml b/modules/dante-module-common/pom.xml
index b688483af9639a9fb5706156f53573cdc8c74d9d..11aaa9638db33fb5a68536c01e27ac61ae59f346 100644
--- a/modules/dante-module-common/pom.xml
+++ b/modules/dante-module-common/pom.xml
@@ -32,7 +32,7 @@
modules
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
dante-module-common
@@ -40,7 +40,7 @@
cn.herodotus.engine
- assistant-core
+ core-foundation
diff --git a/modules/dante-module-metadata/pom.xml b/modules/dante-module-metadata/pom.xml
deleted file mode 100644
index e7a2a522d93086646ad8a4b7da722b433507657e..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/pom.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
- 4.0.0
-
-
- modules
- org.dromara.dante
- 3.5.5.2
-
-
- dante-module-metadata
-
-
-
- org.dromara.dante
- dante-module-social
-
-
-
- cn.herodotus.engine
- supplier-sdk-upms-rest
-
-
-
- cn.herodotus.engine
- oauth2-resource-server-autoconfigure
-
-
-
-
\ No newline at end of file
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysAttributeToSecurityAttributeConverter.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysAttributeToSecurityAttributeConverter.java
deleted file mode 100644
index 5fc1528cb65b897453e32fd141d75b61f0b628ca..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysAttributeToSecurityAttributeConverter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.converter;
-
-import cn.herodotus.engine.oauth2.core.definition.domain.SecurityAttribute;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysAttribute;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.util.StringUtils;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * Description: SysAttribute 转 SecurityAttribute 转换器
- *
- * @author : gengwei.zheng
- * @date : 2023/9/15 0:29
- */
-public class SysAttributeToSecurityAttributeConverter implements Converter {
- @Override
- public SecurityAttribute convert(SysAttribute sysAttribute) {
- SecurityAttribute securityAttribute = new SecurityAttribute();
- securityAttribute.setAttributeId(sysAttribute.getAttributeId());
- securityAttribute.setAttributeCode(sysAttribute.getAttributeCode());
- securityAttribute.setWebExpression(sysAttribute.getWebExpression());
- securityAttribute.setPermissions(permissionToCommaDelimitedString(sysAttribute.getPermissions()));
- securityAttribute.setUrl(sysAttribute.getUrl());
- securityAttribute.setRequestMethod(sysAttribute.getRequestMethod());
- securityAttribute.setServiceId(sysAttribute.getServiceId());
- securityAttribute.setAttributeName(sysAttribute.getDescription());
- return securityAttribute;
-
-
- }
-
- private String permissionToCommaDelimitedString(Set sysAuthorities) {
- if (CollectionUtils.isNotEmpty(sysAuthorities)) {
- List codes = sysAuthorities.stream().map(SysPermission::getPermissionCode).toList();
- return StringUtils.collectionToCommaDelimitedString(codes);
- } else {
- return "";
- }
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysInterfacesToSysAttributesConverter.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysInterfacesToSysAttributesConverter.java
deleted file mode 100644
index bcaf3afccc1a4bef223c739d6bdab63082d3813c..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/converter/SysInterfacesToSysAttributesConverter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.converter;
-
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysAttribute;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysInterface;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.core.convert.converter.Converter;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * Description: List 转 List 转换器
- *
- * @author : gengwei.zheng
- * @date : 2023/8/23 22:59
- */
-public class SysInterfacesToSysAttributesConverter implements Converter, List> {
- @Override
- public List convert(List sysInterfaces) {
- if (CollectionUtils.isNotEmpty(sysInterfaces)) {
- return sysInterfaces.stream().map(this::convert).collect(Collectors.toList());
- }
- return new ArrayList<>();
- }
-
- private SysAttribute convert(SysInterface sysInterface) {
- SysAttribute sysAttribute = new SysAttribute();
- sysAttribute.setAttributeId(sysInterface.getInterfaceId());
- sysAttribute.setAttributeCode(sysInterface.getInterfaceCode());
- sysAttribute.setRequestMethod(sysInterface.getRequestMethod());
- sysAttribute.setServiceId(sysInterface.getServiceId());
- sysAttribute.setClassName(sysInterface.getClassName());
- sysAttribute.setMethodName(sysInterface.getMethodName());
- sysAttribute.setUrl(sysInterface.getUrl());
- sysAttribute.setStatus(sysInterface.getStatus());
- sysAttribute.setReserved(sysInterface.getReserved());
- sysAttribute.setDescription(sysInterface.getDescription());
- sysAttribute.setReversion(sysInterface.getReversion());
- sysAttribute.setCreateTime(sysInterface.getCreateTime());
- sysAttribute.setUpdateTime(sysInterface.getUpdateTime());
- sysAttribute.setRanking(sysInterface.getRanking());
- return sysAttribute;
- }
-
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalChangeUserStatusListener.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalChangeUserStatusListener.java
deleted file mode 100644
index 52a46f1cf30cbb8fe9333b26acf89be8a3704e03..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalChangeUserStatusListener.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.listener;
-
-import cn.herodotus.engine.data.core.enums.DataItemStatus;
-import cn.herodotus.engine.message.core.logic.domain.UserStatus;
-import cn.herodotus.engine.message.core.logic.event.ChangeUserStatusEvent;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
-import org.apache.commons.lang3.ObjectUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
-
-/**
- * Description: 本地用户状态变更监听
- *
- * @author : gengwei.zheng
- * @date : 2022/7/10 17:59
- */
-@Component
-public class LocalChangeUserStatusListener implements ApplicationListener {
-
- private static final Logger log = LoggerFactory.getLogger(LocalChangeUserStatusListener.class);
- private final SysUserService sysUserService;
-
- public LocalChangeUserStatusListener(SysUserService sysUserService) {
- this.sysUserService = sysUserService;
- }
-
- @Override
- public void onApplicationEvent(ChangeUserStatusEvent event) {
-
- log.info("[Herodotus] |- Change user status gather LOCAL listener, response event!");
-
- UserStatus userStatus = event.getData();
- if (ObjectUtils.isNotEmpty(userStatus)) {
- DataItemStatus dataItemStatus = DataItemStatus.valueOf(userStatus.getStatus());
- if (ObjectUtils.isNotEmpty(dataItemStatus)) {
- sysUserService.changeStatus(userStatus.getUserId(), dataItemStatus);
- }
- }
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalRequestMappingGatherListener.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalRequestMappingGatherListener.java
deleted file mode 100644
index a599028d6ff76231acc5746ad34ee37044895ac9..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/LocalRequestMappingGatherListener.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.listener;
-
-import org.dromara.dante.module.metadata.processor.RequestMappingStoreProcessor;
-import cn.herodotus.engine.message.core.logic.domain.RequestMapping;
-import cn.herodotus.engine.message.core.logic.event.RequestMappingGatherEvent;
-import org.apache.commons.collections4.CollectionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * Description: 本地RequestMapping收集监听
- *
- * 主要在单体式架构,以及 UUA 服务自身使用
- *
- * @author : gengwei.zheng
- * @date : 2021/8/8 22:02
- */
-@Component
-public class LocalRequestMappingGatherListener implements ApplicationListener {
-
- private static final Logger log = LoggerFactory.getLogger(LocalRequestMappingGatherListener.class);
-
- private final RequestMappingStoreProcessor requestMappingStoreProcessor;
-
- @Autowired
- public LocalRequestMappingGatherListener(RequestMappingStoreProcessor requestMappingStoreProcessor) {
- this.requestMappingStoreProcessor = requestMappingStoreProcessor;
- }
-
- @Override
- public void onApplicationEvent(RequestMappingGatherEvent event) {
-
- log.info("[Herodotus] |- Request mapping gather LOCAL listener, response event!");
-
- List requestMappings = event.getData();
- if (CollectionUtils.isNotEmpty(requestMappings)) {
- requestMappingStoreProcessor.postProcess(requestMappings);
- }
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteRequestMappingGatherListener.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteRequestMappingGatherListener.java
deleted file mode 100644
index 0da3da952826fc39a027a11cc2012e7985d5ed62..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteRequestMappingGatherListener.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.listener;
-
-import org.dromara.dante.module.metadata.processor.RequestMappingStoreProcessor;
-import cn.herodotus.engine.assistant.core.json.jackson2.utils.Jackson2Utils;
-import cn.herodotus.engine.message.core.logic.domain.RequestMapping;
-import cn.herodotus.engine.oauth2.resource.autoconfigure.bus.RemoteRequestMappingGatherEvent;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.ObjectUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * Description: SecurityMetadata远程变更事件监听
- *
- * @author : gengwei.zheng
- * @date : 2021/8/5 16:16
- */
-@Component
-public class RemoteRequestMappingGatherListener implements ApplicationListener {
-
- private static final Logger log = LoggerFactory.getLogger(RemoteRequestMappingGatherListener.class);
-
- private final RequestMappingStoreProcessor requestMappingStoreProcessor;
-
- @Autowired
- public RemoteRequestMappingGatherListener(RequestMappingStoreProcessor requestMappingStoreProcessor) {
- this.requestMappingStoreProcessor = requestMappingStoreProcessor;
- }
-
- @Override
- public void onApplicationEvent(RemoteRequestMappingGatherEvent event) {
-
- log.info("[Herodotus] |- Request mapping gather REMOTE listener, response service [{}] event!", event.getOriginService());
-
- String requestMapping = event.getData();
- log.debug("[Herodotus] |- Fetch data [{}]", requestMapping);
- if (ObjectUtils.isNotEmpty(requestMapping)) {
- List requestMappings = Jackson2Utils.toList(requestMapping, RequestMapping.class);
- if (CollectionUtils.isNotEmpty(requestMappings)) {
- requestMappingStoreProcessor.postProcess(requestMappings);
- }
- }
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/SysAttributeChangeListener.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/SysAttributeChangeListener.java
deleted file mode 100644
index 993cdfd1083397df8fbbb3c26396fe05610b4d87..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/SysAttributeChangeListener.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.listener;
-
-import org.dromara.dante.module.metadata.processor.SecurityMetadataDistributeProcessor;
-import cn.herodotus.engine.supplier.upms.logic.domain.event.SysAttributeChangeEvent;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysAttribute;
-import org.apache.commons.lang3.ObjectUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
-
-/**
- * Description: SysSecurityAttribute变更事件监听
- *
- * @author : gengwei.zheng
- * @date : 2021/8/4 22:18
- */
-@Component
-public class SysAttributeChangeListener implements ApplicationListener {
-
- private static final Logger log = LoggerFactory.getLogger(SysAttributeChangeListener.class);
-
- private final SecurityMetadataDistributeProcessor securityMetadataDistributeProcessor;
-
- public SysAttributeChangeListener(SecurityMetadataDistributeProcessor securityMetadataDistributeProcessor) {
- this.securityMetadataDistributeProcessor = securityMetadataDistributeProcessor;
- }
-
- @Override
- public void onApplicationEvent(SysAttributeChangeEvent event) {
-
- log.debug("[Herodotus] |- SysAttribute Change Listener, response event!");
-
- SysAttribute sysAttribute = event.getData();
- if (ObjectUtils.isNotEmpty(sysAttribute)) {
- log.debug("[Herodotus] |- Got SysAttribute, start to process SysAttribute change.");
- securityMetadataDistributeProcessor.distributeChangedSecurityAttribute(sysAttribute);
- }
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/RequestMappingStoreProcessor.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/RequestMappingStoreProcessor.java
deleted file mode 100644
index 072af7804efc6785ea44afebd9eba88d7e3cd078..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/RequestMappingStoreProcessor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.processor;
-
-import cn.herodotus.engine.message.core.logic.domain.RequestMapping;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * Description: RequestMapping存储服务
- *
- * @author : gengwei.zheng
- * @date : 2021/8/7 14:15
- */
-@Component
-public class RequestMappingStoreProcessor {
-
- private static final Logger log = LoggerFactory.getLogger(RequestMappingStoreProcessor.class);
-
- private final SecurityMetadataDistributeProcessor securityMetadataDistributeProcessor;
-
- @Autowired
- public RequestMappingStoreProcessor(SecurityMetadataDistributeProcessor securityMetadataDistributeProcessor) {
- this.securityMetadataDistributeProcessor = securityMetadataDistributeProcessor;
- }
-
- @Async
- public void postProcess(List requestMappings) {
- log.debug("[Herodotus] |- [4] Async store request mapping process BEGIN!");
- securityMetadataDistributeProcessor.postRequestMappings(requestMappings);
- }
-}
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/SecurityMetadataDistributeProcessor.java b/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/SecurityMetadataDistributeProcessor.java
deleted file mode 100644
index 3d6cc7e01c4a58423960d783d13591a5b432d3d7..0000000000000000000000000000000000000000
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/processor/SecurityMetadataDistributeProcessor.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.metadata.processor;
-
-import org.dromara.dante.module.metadata.converter.SysAttributeToSecurityAttributeConverter;
-import org.dromara.dante.module.metadata.converter.SysInterfacesToSysAttributesConverter;
-import cn.herodotus.engine.assistant.core.exception.transaction.TransactionalRollbackException;
-import cn.herodotus.engine.message.core.definition.strategy.StrategyEventManager;
-import cn.herodotus.engine.message.core.logic.domain.RequestMapping;
-import cn.herodotus.engine.oauth2.authorization.processor.SecurityMetadataSourceAnalyzer;
-import cn.herodotus.engine.oauth2.core.definition.domain.SecurityAttribute;
-import cn.herodotus.engine.oauth2.resource.autoconfigure.bus.RemoteSecurityMetadataSyncEvent;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysAttribute;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysInterface;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysAttributeService;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysInterfaceService;
-import com.google.common.collect.ImmutableList;
-import org.apache.commons.collections4.CollectionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * Description: SecurityMetadata数据处理器
- *
- * @author : gengwei.zheng
- * @date : 2021/8/8 14:00
- */
-@Component
-public class SecurityMetadataDistributeProcessor implements StrategyEventManager> {
-
- private static final Logger log = LoggerFactory.getLogger(SecurityMetadataDistributeProcessor.class);
-
- private final Converter, List> toSysAttributes;
- private final Converter toSecurityAttribute;
-
- private final SysAttributeService sysAttributeService;
- private final SysInterfaceService sysInterfaceService;
- private final SecurityMetadataSourceAnalyzer securityMetadataSourceAnalyzer;
-
- public SecurityMetadataDistributeProcessor(SysAttributeService sysAttributeService, SysInterfaceService sysInterfaceService, SecurityMetadataSourceAnalyzer securityMetadataSourceAnalyzer) {
- this.sysAttributeService = sysAttributeService;
- this.sysInterfaceService = sysInterfaceService;
- this.securityMetadataSourceAnalyzer = securityMetadataSourceAnalyzer;
- this.toSysAttributes = new SysInterfacesToSysAttributesConverter();
- this.toSecurityAttribute = new SysAttributeToSecurityAttributeConverter();
- }
-
- @Override
- public void postLocalProcess(List data) {
- securityMetadataSourceAnalyzer.processSecurityAttribute(data);
- }
-
- @Override
- public void postRemoteProcess(String data, String originService, String destinationService) {
- publishEvent(new RemoteSecurityMetadataSyncEvent(data, originService, destinationService));
- }
-
- /**
- * 将SysAuthority表中存在,但是SysSecurityAttribute中不存在的数据同步至SysSecurityAttribute,保证两侧数据一致
- */
- @Transactional(rollbackFor = TransactionalRollbackException.class)
- public void postRequestMappings(List requestMappings) {
- List storedInterfaces = sysInterfaceService.storeRequestMappings(requestMappings);
- if (CollectionUtils.isNotEmpty(storedInterfaces)) {
- log.debug("[Herodotus] |- [5] Request mapping store success, start to merge security metadata!");
-
- List sysInterfaces = sysInterfaceService.findAllocatable();
-
- if (CollectionUtils.isNotEmpty(sysInterfaces)) {
- List elements = toSysAttributes.convert(sysInterfaces);
- List result = sysAttributeService.saveAllAndFlush(elements);
- if (CollectionUtils.isNotEmpty(result)) {
- log.debug("[Herodotus] |- Merge security attribute SUCCESS and FINISHED!");
- } else {
- log.error("[Herodotus] |- Merge Security attribute failed!, Please Check!");
- }
- } else {
- log.debug("[Herodotus] |- No security attribute requires merge, SKIP!");
- }
-
- distributeServiceSecurityAttributes(storedInterfaces);
- }
- }
-
- private void distributeServiceSecurityAttributes(List storedInterfaces) {
- storedInterfaces.stream().findAny().ifPresent(item -> {
- String serviceId = item.getServiceId();
- List sysAttributes = sysAttributeService.findAllByServiceId(item.getServiceId());
- if (CollectionUtils.isNotEmpty(sysAttributes)) {
- List securityAttributes = sysAttributes.stream().map(toSecurityAttribute::convert).toList();
- log.debug("[Herodotus] |- [6] Synchronization permissions to service [{}]", serviceId);
- this.postProcess(serviceId, securityAttributes);
- }
- });
- }
-
- public void distributeChangedSecurityAttribute(SysAttribute sysAttribute) {
- SecurityAttribute securityAttribute = toSecurityAttribute.convert(sysAttribute);
- postProcess(securityAttribute.getServiceId(), ImmutableList.of(securityAttribute));
- }
-}
diff --git a/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/config/SocialModuleConfiguration.java b/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/config/SocialModuleConfiguration.java
deleted file mode 100644
index e86f70b7b061afaef5431da4b3ab2541de470511..0000000000000000000000000000000000000000
--- a/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/config/SocialModuleConfiguration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.social.config;
-
-import org.dromara.dante.module.social.processor.DefaultSocialAuthenticationHandler;
-import cn.herodotus.engine.access.all.configuration.AccessAllConfiguration;
-import jakarta.annotation.PostConstruct;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-
-/**
- * Description: UPMS 社交配置
- *
- * @author : gengwei.zheng
- * @date : 2022/2/2 17:05
- */
-@Configuration(proxyBeanMethods = false)
-@Import({AccessAllConfiguration.class})
-public class SocialModuleConfiguration {
-
- private static final Logger log = LoggerFactory.getLogger(SocialModuleConfiguration.class);
-
- @PostConstruct
- public void postConstruct() {
- log.info("[Herodotus] |- SDK [Module Upms Social] Auto Configure.");
- }
-
- @Bean
- @ConditionalOnMissingBean
- public DefaultSocialAuthenticationHandler defaultSocialAuthenticationHandler() {
- DefaultSocialAuthenticationHandler defaultSocialAuthenticationHandler = new DefaultSocialAuthenticationHandler();
- log.trace("[Herodotus] |- Bean [Default Social Authentication Handler] Auto Configure.");
- return defaultSocialAuthenticationHandler;
- }
-}
diff --git a/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/processor/DefaultSocialAuthenticationHandler.java b/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/processor/DefaultSocialAuthenticationHandler.java
deleted file mode 100644
index 653b98ba6f5ae47d2a161ef297ce6e3e9f3e201e..0000000000000000000000000000000000000000
--- a/modules/dante-module-social/src/main/java/org/dromara/dante/module/social/processor/DefaultSocialAuthenticationHandler.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.module.social.processor;
-
-import cn.herodotus.engine.access.all.processor.AccessHandlerStrategyFactory;
-import cn.herodotus.engine.access.core.definition.AccessUserDetails;
-import cn.herodotus.engine.access.core.exception.AccessIdentityVerificationFailedException;
-import cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser;
-import cn.herodotus.engine.oauth2.core.definition.domain.SocialUserDetails;
-import cn.herodotus.engine.oauth2.core.definition.handler.AbstractSocialAuthenticationHandler;
-import cn.herodotus.engine.oauth2.core.exception.SocialCredentialsParameterBindingFailedException;
-import cn.herodotus.engine.oauth2.core.exception.UsernameAlreadyExistsException;
-import cn.herodotus.engine.supplier.upms.logic.converter.SysUserToHerodotusUserConverter;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysSocialUser;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysSocialUserService;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
-import com.google.common.collect.ImmutableSet;
-import org.apache.commons.lang3.ObjectUtils;
-import org.apache.commons.lang3.StringUtils;
-import cn.hutool.v7.core.bean.BeanUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.convert.converter.Converter;
-
-/**
- * Description: 社交登录默认处理器。
- *
- * @author : gengwei.zheng
- * @date : 2022/1/26 23:44
- */
-public class DefaultSocialAuthenticationHandler extends AbstractSocialAuthenticationHandler {
-
- @Autowired
- private SysUserService sysUserService;
- @Autowired
- private SysSocialUserService sysSocialUserService;
- @Autowired
- private AccessHandlerStrategyFactory accessHandlerStrategyFactory;
-
- private final Converter toUser;
-
- public DefaultSocialAuthenticationHandler() {
- this.toUser = new SysUserToHerodotusUserConverter();
- }
-
- @Override
- public SocialUserDetails identity(String source, AccessPrincipal accessPrincipal) throws AccessIdentityVerificationFailedException {
- AccessUserDetails accessUserDetails = accessHandlerStrategyFactory.findAccessUserDetails(source, accessPrincipal);
-
- if (BeanUtil.isNotEmpty(accessUserDetails)) {
- SysSocialUser sysSocialUser = new SysSocialUser();
- BeanUtil.copyProperties(accessUserDetails, sysSocialUser);
- return sysSocialUser;
- }
-
- throw new AccessIdentityVerificationFailedException("Access Identity Verification Failed!");
- }
-
- @Override
- public SocialUserDetails isUserExist(SocialUserDetails socialUserDetails) {
- String uuid = socialUserDetails.getUuid();
- String source = socialUserDetails.getSource();
- if (StringUtils.isNotBlank(uuid) && StringUtils.isNotBlank(source)) {
- return sysSocialUserService.findByUuidAndSource(uuid, source);
- }
-
- return null;
- }
-
- @Override
- public HerodotusUser register(SocialUserDetails socialUserDetails) throws UsernameAlreadyExistsException {
- return sysUserService.registerUserDetails(socialUserDetails);
- }
-
- @Override
- public void binding(String userId, SocialUserDetails socialUserDetails) throws SocialCredentialsParameterBindingFailedException {
- if (socialUserDetails instanceof SysSocialUser sysSocialUser) {
- SysUser sysUser = new SysUser();
- sysUser.setUserId(userId);
- sysSocialUser.setUsers(ImmutableSet.builder().add(sysUser).build());
- sysSocialUserService.saveAndFlush(sysSocialUser);
- }
- }
-
- @Override
- public void additionalRegisterOperation(HerodotusUser herodotusUserDetails, SocialUserDetails socialUserDetails) {
-
- }
-
- @Override
- public HerodotusUser signIn(SocialUserDetails socialUserDetails) {
- if (socialUserDetails instanceof SysSocialUser sysSocialUser) {
- SysUser sysUser = sysSocialUser.getUsers().stream().findFirst().orElse(null);
- if (ObjectUtils.isNotEmpty(sysUser)) {
- return toUser.convert(sysUser);
- } else {
- return null;
- }
- }
-
- return null;
- }
-
- @Override
- public void additionalSignInOperation(HerodotusUser herodotusUserDetails, SocialUserDetails newSocialUserDetails, SocialUserDetails oldSocialUserDetails) {
- if (newSocialUserDetails instanceof SysSocialUser newSysSocialUser && oldSocialUserDetails instanceof SysSocialUser oldSysSocialUser) {
- setSocialUserInfo(oldSysSocialUser, newSysSocialUser.getAccessToken(), newSysSocialUser.getExpireIn(), newSysSocialUser.getRefreshToken(), newSysSocialUser.getRefreshTokenExpireIn(), newSysSocialUser.getScope(), newSysSocialUser.getTokenType(), newSysSocialUser.getUid(), newSysSocialUser.getOpenId(), newSysSocialUser.getAccessCode(), newSysSocialUser.getUnionId());
- sysSocialUserService.saveAndFlush(oldSysSocialUser);
- }
- }
-
- protected void setSocialUserInfo(SysSocialUser sysSocialUser, String accessToken, Integer expireIn, String refreshToken, Integer refreshTokenExpireIn, String scope, String tokenType, String uid, String openId, String accessCode, String unionId) {
- sysSocialUser.setAccessToken(accessToken);
- sysSocialUser.setExpireIn(expireIn);
- sysSocialUser.setRefreshToken(refreshToken);
- sysSocialUser.setRefreshTokenExpireIn(refreshTokenExpireIn);
- sysSocialUser.setScope(scope);
- sysSocialUser.setTokenType(tokenType);
- sysSocialUser.setUid(uid);
- sysSocialUser.setOpenId(openId);
- sysSocialUser.setAccessCode(accessCode);
- sysSocialUser.setUnionId(unionId);
- }
-}
diff --git a/modules/dante-monomer-autoconfigure/pom.xml b/modules/dante-monomer-autoconfigure/pom.xml
index 416e64b750228f0223f81b9d10c954a184ee5e79..04091b66e96f59a26d12fb0110ff4e42337eb54a 100644
--- a/modules/dante-monomer-autoconfigure/pom.xml
+++ b/modules/dante-monomer-autoconfigure/pom.xml
@@ -27,27 +27,25 @@
org.dromara.dante
modules
- 3.5.5.2
+ 3.5.5.3
dante-monomer-autoconfigure
- org.dromara.dante
- authentication-spring-boot-starter
+ cn.herodotus.engine
+ rest-module-servlet-upms
+
org.dromara.dante
- dante-module-metadata
-
-
- cn.herodotus.engine
- message-spring-boot-starter
+ authentication-spring-boot-starter
+
cn.herodotus.engine
- supplier-sdk-message
+ servlet-message-spring-boot-starter
@@ -55,6 +53,11 @@
oss-spring-boot-starter
+
+ com.github.ulisesbocchio
+ jasypt-spring-boot-starter
+
+
\ No newline at end of file
diff --git a/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/MonomerAutoConfiguration.java b/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/MonomerAutoConfiguration.java
index ac1de88cd7d9471494320af842d91582339b4bb2..da3d4afae37b90dbe63792114511f54937c7fc7c 100644
--- a/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/MonomerAutoConfiguration.java
+++ b/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/MonomerAutoConfiguration.java
@@ -25,6 +25,7 @@
package org.dromara.dante.monomer.autoconfigure;
+import cn.herodotus.engine.rest.servlet.upms.annotation.EnableHerodotusRestServletUpms;
import jakarta.annotation.PostConstruct;
import org.dromara.dante.monomer.autoconfigure.processor.MonomerBusBridge;
import org.dromara.dante.monomer.autoconfigure.processor.MonomerCorsFilter;
@@ -41,6 +42,7 @@ import org.springframework.context.annotation.Bean;
* @date : 2024/10/3 17:38
*/
@AutoConfiguration
+@EnableHerodotusRestServletUpms
public class MonomerAutoConfiguration {
private static final Logger log = LoggerFactory.getLogger(MonomerAutoConfiguration.class);
diff --git a/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/processor/MonomerCorsFilter.java b/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/processor/MonomerCorsFilter.java
index 44d1aad621bd3e52b3ffedadebb86c60a0fc880f..a376ed226c09bc8d65eb8dcf298ab58a8e94a431 100644
--- a/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/processor/MonomerCorsFilter.java
+++ b/modules/dante-monomer-autoconfigure/src/main/java/org/dromara/dante/monomer/autoconfigure/processor/MonomerCorsFilter.java
@@ -25,8 +25,9 @@
package org.dromara.dante.monomer.autoconfigure.processor;
-import cn.herodotus.engine.assistant.core.utils.http.HeaderUtils;
-import cn.herodotus.engine.assistant.definition.constants.SymbolConstants;
+import cn.herodotus.engine.core.definition.constant.HerodotusHeaders;
+import cn.herodotus.engine.core.definition.constant.SymbolConstants;
+import cn.herodotus.engine.web.core.servlet.utils.HeaderUtils;
import com.google.common.net.HttpHeaders;
import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;
@@ -52,7 +53,7 @@ public class MonomerCorsFilter implements Filter {
private static final String[] ACCESS_CONTROL_ALLOW_METHODS = new String[]{HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(), HttpMethod.DELETE.name(), HttpMethod.OPTIONS.name()};
- private static final String[] ACCESS_CONTROL_ALLOW_HEADERS = new String[]{HttpHeaders.X_REQUESTED_WITH, HttpHeaders.AUTHORIZATION, HttpHeaders.CONTENT_TYPE, "X-XSRF-TOKEN", HeaderUtils.X_HERODOTUS_SESSION_ID, HeaderUtils.X_HERODOTUS_TENANT_ID};
+ private static final String[] ACCESS_CONTROL_ALLOW_HEADERS = new String[]{HttpHeaders.X_REQUESTED_WITH, HttpHeaders.AUTHORIZATION, HttpHeaders.CONTENT_TYPE, "X-XSRF-TOKEN", HerodotusHeaders.X_HERODOTUS_SESSION_ID, HerodotusHeaders.X_HERODOTUS_TENANT_ID};
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {
diff --git a/modules/dante-monomer-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/modules/dante-monomer-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 7188387ac84f47a31598eb87696cec0f9d356ce3..bd15d6fdd72d1d8f92240c870ad387adb1598ae5 100644
--- a/modules/dante-monomer-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/modules/dante-monomer-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -23,6 +23,4 @@
# 6. 若您的项目无法满足以上几点,可申请商业授权
#
-org.dromara.dante.monomer.autoconfigure.MonomerAutoConfiguration
-org.dromara.dante.module.metadata.config.MetadataModuleConfiguration
-cn.herodotus.engine.supplier.message.configuration.SupplierMessageConfiguration
\ No newline at end of file
+org.dromara.dante.monomer.autoconfigure.MonomerAutoConfiguration
\ No newline at end of file
diff --git a/modules/pom.xml b/modules/pom.xml
index de26f60b3d2b546cf30bc6c0a6cd3cd1613738d3..aee11d5cacef835d3184817b743a12de15b86cc2 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -32,7 +32,7 @@
dante-cloud
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
modules
@@ -66,9 +66,6 @@
dante-module-common
- dante-module-social
- dante-module-metadata
- dante-module-strategy
dante-monomer-autoconfigure
diff --git a/packages/authentication-spring-boot-starter/pom.xml b/packages/authentication-spring-boot-starter/pom.xml
index 88ef49887647e63576486f9a27f50867732e265e..a7a666d77317a1b8fcec92390e57a7883d4c0d7f 100644
--- a/packages/authentication-spring-boot-starter/pom.xml
+++ b/packages/authentication-spring-boot-starter/pom.xml
@@ -32,7 +32,7 @@
packages
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
authentication-spring-boot-starter
@@ -40,12 +40,17 @@
org.dromara.dante
- dante-module-strategy
+ rpc-client-uaa-spring-boot-starter
cn.herodotus.engine
- oauth2-authorization-server-autoconfigure
+ oauth2-authentication-autoconfigure
+
+
+
+ cn.herodotus.engine
+ webmvc-spring-boot-starter
diff --git a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/ArchitectureStrategyAutoConfiguration.java b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/ArchitectureStrategyAutoConfiguration.java
deleted file mode 100644
index 0ffc1f0530eb9115081cca6376c3aa6906eed6fd..0000000000000000000000000000000000000000
--- a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/ArchitectureStrategyAutoConfiguration.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.authentication.autoconfigure;
-
-import jakarta.annotation.PostConstruct;
-import org.dromara.dante.module.strategy.config.DistributedArchitectureConfiguration;
-import org.dromara.dante.module.strategy.config.MonocoqueArchitectureConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.context.annotation.Import;
-
-/**
- * Description: 策略模块配置
- *
- * @author : gengwei.zheng
- * @date : 2022/2/1 17:58
- */
-@AutoConfiguration
-@Import({
- DistributedArchitectureConfiguration.class,
- MonocoqueArchitectureConfiguration.class
-})
-public class ArchitectureStrategyAutoConfiguration {
-
- private static final Logger log = LoggerFactory.getLogger(ArchitectureStrategyAutoConfiguration.class);
-
- @PostConstruct
- public void postConstruct() {
- log.debug("[Herodotus] |- Module [Strategy Module] Auto Configure.");
- }
-}
diff --git a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthenticationAutoConfiguration.java b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthenticationAutoConfiguration.java
deleted file mode 100644
index 2a3614de458936275785437806f9c33e6c093fa4..0000000000000000000000000000000000000000
--- a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthenticationAutoConfiguration.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.authentication.autoconfigure;
-
-import jakarta.annotation.PostConstruct;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-
-/**
- * Description: OAuth Starter 自动注入配置
- *
- * @author : gengwei.zheng
- * @date : 2022/2/17 13:43
- */
-@AutoConfiguration
-public class AuthenticationAutoConfiguration {
-
- private static final Logger log = LoggerFactory.getLogger(AuthenticationAutoConfiguration.class);
-
- @PostConstruct
- public void postConstruct() {
- log.info("[Herodotus] |- Module [Herodotus Authentication Starter] Auto Configure.");
- }
-}
diff --git a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationServerAutoConfiguration.java b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationAutoConfiguration.java
similarity index 77%
rename from packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationServerAutoConfiguration.java
rename to packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationAutoConfiguration.java
index 6e9e185d091ff85c0049548a3bd236c33dd614e7..f34cd0bdb68ed5b7dff1b956676a301af0323d86 100644
--- a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationServerAutoConfiguration.java
+++ b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/AuthorizationAutoConfiguration.java
@@ -25,26 +25,22 @@
package org.dromara.dante.authentication.autoconfigure;
-import cn.herodotus.engine.assistant.core.utils.ResourceResolver;
+import cn.herodotus.engine.core.autoconfigure.oauth2.OAuth2AuthorizationProperties;
+import cn.herodotus.engine.core.foundation.enums.Certificate;
+import cn.herodotus.engine.core.foundation.utils.ResourceResolverUtils;
+import cn.herodotus.engine.core.identity.service.ClientDetailsService;
+import cn.herodotus.engine.oauth2.authentication.autoconfigure.customizer.OAuth2AuthorizationServerConfigurerCustomizer;
+import cn.herodotus.engine.oauth2.authentication.configurer.OAuth2AuthenticationConfigurerManager;
import cn.herodotus.engine.oauth2.authentication.configurer.OAuth2AuthenticationProviderConfigurer;
-import cn.herodotus.engine.oauth2.authentication.customizer.OAuth2FormLoginConfigurerCustomizer;
-import cn.herodotus.engine.oauth2.authentication.properties.OAuth2AuthenticationProperties;
import cn.herodotus.engine.oauth2.authentication.utils.OAuth2ConfigurerUtils;
-import cn.herodotus.engine.oauth2.authorization.autoconfigure.customizer.OAuth2AuthorizationServerConfigurerCustomizer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2ResourceServerConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2SessionManagementConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.properties.OAuth2AuthorizationProperties;
-import cn.herodotus.engine.oauth2.core.definition.service.ClientDetailsService;
-import cn.herodotus.engine.oauth2.core.enums.Certificate;
-import cn.herodotus.engine.oauth2.management.response.OAuth2DeviceVerificationResponseHandler;
-import cn.herodotus.engine.oauth2.management.response.OidcClientRegistrationResponseHandler;
-import cn.herodotus.engine.rest.condition.properties.EndpointProperties;
-import cn.herodotus.engine.rest.protect.crypto.processor.HttpCryptoProcessor;
-import cn.herodotus.engine.rest.protect.tenant.MultiTenantFilter;
+import cn.herodotus.engine.oauth2.authorization.servlet.ServletOAuth2AuthorizationConfigurerManager;
+import cn.herodotus.engine.web.service.properties.EndpointProperties;
+import cn.herodotus.engine.web.servlet.tenant.MultiTenantFilter;
import com.nimbusds.jose.jwk.JWKSet;
import com.nimbusds.jose.jwk.RSAKey;
import com.nimbusds.jose.jwk.source.JWKSource;
import com.nimbusds.jose.proc.SecurityContext;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -84,9 +80,14 @@ import java.util.UUID;
* @date : 2022/2/12 20:57
*/
@AutoConfiguration
-public class AuthorizationServerAutoConfiguration {
+public class AuthorizationAutoConfiguration {
- private static final Logger log = LoggerFactory.getLogger(AuthorizationServerAutoConfiguration.class);
+ private static final Logger log = LoggerFactory.getLogger(AuthorizationAutoConfiguration.class);
+
+ @PostConstruct
+ public void postConstruct() {
+ log.info("[Herodotus] |- Auto [Authorization Server] Configure.");
+ }
@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
@@ -95,16 +96,11 @@ public class AuthorizationServerAutoConfiguration {
PasswordEncoder passwordEncoder,
UserDetailsService userDetailsService,
ClientDetailsService clientDetailsService,
- HttpCryptoProcessor httpCryptoProcessor,
- OidcClientRegistrationResponseHandler oidcClientRegistrationResponseHandler,
- OAuth2AuthenticationProperties oauth2AuthenticationProperties,
- OAuth2DeviceVerificationResponseHandler oauth2DeviceVerificationResponseHandler,
- OAuth2FormLoginConfigurerCustomizer oauth2FormLoginConfigurerCustomizer,
- OAuth2ResourceServerConfigurerCustomer oauth2ResourceServerConfigurerCustomer,
- OAuth2SessionManagementConfigurerCustomer oauth2sessionManagementConfigurerCustomer
+ OAuth2AuthenticationConfigurerManager authenticationConfigurerManager,
+ ServletOAuth2AuthorizationConfigurerManager authorizationConfigurerManager
) throws Exception {
- log.debug("[Herodotus] |- Bean [Authorization Server Security Filter Chain] Auto Configure.");
+ log.debug("[Herodotus] |- Bean [Authorization Server Security Filter Chain] Configure.");
SessionRegistry sessionRegistry = OAuth2ConfigurerUtils.getOptionalBean(httpSecurity, SessionRegistry.class);
@@ -115,14 +111,14 @@ public class AuthorizationServerAutoConfiguration {
// 不配置 oauth2ResourceServer 就不会启用BearerTokenAuthenticationFilter
// 当前的版本 SAS(1.4.1) 环境下,oauth2ResourceServer 必须在 with(authorizationServerConfigurer 前面配置,否则会导致应用无法启动
// 主要原因是 OAuth2AuthorizationServerConfigurer 默认 jwt 配置与 Opaqua 配置冲突。see:https://stackoverflow.com/questions/79336064/oidcuserinfoauthenticationprovider-doesnt-support-for-opaque-token-bearer-autho
- .oauth2ResourceServer(oauth2ResourceServerConfigurerCustomer)
- .with(authorizationServerConfigurer, new OAuth2AuthorizationServerConfigurerCustomizer(httpSecurity, sessionRegistry, clientDetailsService, httpCryptoProcessor, oidcClientRegistrationResponseHandler, oauth2DeviceVerificationResponseHandler))
+ .oauth2ResourceServer(authorizationConfigurerManager.getOAuth2ResourceServerConfigurerCustomer())
+ .with(authorizationServerConfigurer, new OAuth2AuthorizationServerConfigurerCustomizer(httpSecurity, sessionRegistry, clientDetailsService, authenticationConfigurerManager))
// 开启请求认证
.authorizeHttpRequests(authorizeRequests -> authorizeRequests.anyRequest().authenticated())
- .formLogin(oauth2FormLoginConfigurerCustomizer)
- .sessionManagement(oauth2sessionManagementConfigurerCustomer)
+ .formLogin(authenticationConfigurerManager.getOAuth2FormLoginConfigurerCustomizer())
+ .sessionManagement(authorizationConfigurerManager.getOAuth2SessionManagementConfigurerCustomer())
.addFilterBefore(new MultiTenantFilter(), AuthorizationFilter.class)
- .with(new OAuth2AuthenticationProviderConfigurer(sessionRegistry, passwordEncoder, userDetailsService, oauth2AuthenticationProperties), (configurer) -> {
+ .with(new OAuth2AuthenticationProviderConfigurer(sessionRegistry, passwordEncoder, userDetailsService, authenticationConfigurerManager.getOAuth2AuthenticationProperties()), (configurer) -> {
});
return httpSecurity.build();
@@ -136,7 +132,7 @@ public class AuthorizationServerAutoConfiguration {
KeyPair keyPair = null;
if (jwk.getCertificate() == Certificate.CUSTOM) {
try {
- Resource[] resource = ResourceResolver.getResources(jwk.getJksKeyStore());
+ Resource[] resource = ResourceResolverUtils.getResources(jwk.getJksKeyStore());
if (ArrayUtils.isNotEmpty(resource)) {
KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(resource[0], jwk.getJksStorePassword().toCharArray());
keyPair = keyStoreKeyFactory.getKeyPair(jwk.getJksKeyAlias(), jwk.getJksKeyPassword().toCharArray());
diff --git a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/DefaultSecurityAutoConfiguration.java b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/DefaultSecurityAutoConfiguration.java
index d4a9e4a6e21f3d11e080be25fb46ec0d234b5844..e13c4068eb3c392963c09b846ed255e4f68fd283 100644
--- a/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/DefaultSecurityAutoConfiguration.java
+++ b/packages/authentication-spring-boot-starter/src/main/java/org/dromara/dante/authentication/autoconfigure/DefaultSecurityAutoConfiguration.java
@@ -25,29 +25,18 @@
package org.dromara.dante.authentication.autoconfigure;
-import cn.herodotus.engine.captcha.core.processor.CaptchaRendererFactory;
+import cn.herodotus.engine.core.foundation.support.captcha.CaptchaRendererFactory;
+import cn.herodotus.engine.core.identity.strategy.StrategyUserDetailsService;
+import cn.herodotus.engine.oauth2.authentication.configurer.OAuth2AuthenticationConfigurerManager;
import cn.herodotus.engine.oauth2.authentication.configurer.OAuth2FormLoginSecureConfigurer;
-import cn.herodotus.engine.oauth2.authentication.properties.OAuth2AuthenticationProperties;
-import cn.herodotus.engine.oauth2.authentication.response.DefaultOAuth2AuthenticationEventPublisher;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2AuthorizeHttpRequestsConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2ResourceServerConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2SessionManagementConfigurerCustomer;
-import cn.herodotus.engine.oauth2.core.definition.service.ClientDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyUserDetailsService;
-import cn.herodotus.engine.oauth2.core.response.HerodotusAccessDeniedHandler;
-import cn.herodotus.engine.oauth2.core.response.HerodotusAuthenticationEntryPoint;
-import cn.herodotus.engine.oauth2.management.processor.HerodotusClientDetailsService;
-import cn.herodotus.engine.oauth2.management.processor.HerodotusUserDetailsService;
-import cn.herodotus.engine.oauth2.management.service.OAuth2ApplicationService;
-import cn.herodotus.engine.rest.protect.crypto.processor.HttpCryptoProcessor;
+import cn.herodotus.engine.oauth2.authentication.customizer.HerodotusUserDetailsService;
+import cn.herodotus.engine.oauth2.authorization.servlet.ServletOAuth2AuthorizationConfigurerManager;
+import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
-import org.springframework.security.authentication.AuthenticationEventPublisher;
-import org.springframework.security.authentication.event.AuthenticationFailureBadCredentialsEvent;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
@@ -68,32 +57,32 @@ public class DefaultSecurityAutoConfiguration {
private static final Logger log = LoggerFactory.getLogger(DefaultSecurityAutoConfiguration.class);
+ @PostConstruct
+ public void postConstruct() {
+ log.info("[Herodotus] |- Auto [Default Security] Configure.");
+ }
+
@Bean
SecurityFilterChain defaultSecurityFilterChain(
HttpSecurity httpSecurity,
UserDetailsService userDetailsService,
- HttpCryptoProcessor httpCryptoProcessor,
- OAuth2AuthenticationProperties authenticationProperties,
CaptchaRendererFactory captchaRendererFactory,
- OAuth2SessionManagementConfigurerCustomer oauth2SessionManagementConfigurerCustomer,
- OAuth2ResourceServerConfigurerCustomer oauth2ResourceServerConfigurerCustomer,
- OAuth2AuthorizeHttpRequestsConfigurerCustomer oauth2AuthorizeHttpRequestsConfigurerCustomer
+ OAuth2AuthenticationConfigurerManager authenticationConfigurerManager,
+ ServletOAuth2AuthorizationConfigurerManager authorizationConfigurerManager
) throws Exception {
- log.debug("[Herodotus] |- Bean [Default Security Filter Chain] Auto Configure.");
+ log.debug("[Herodotus] |- Bean [Default Security Filter Chain] Configure.");
// 禁用CSRF 开启跨域
httpSecurity.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
// @formatter:off
httpSecurity
- .authorizeHttpRequests(oauth2AuthorizeHttpRequestsConfigurerCustomer)
- .sessionManagement(oauth2SessionManagementConfigurerCustomer)
- .exceptionHandling(exceptions -> {
- exceptions.authenticationEntryPoint(new HerodotusAuthenticationEntryPoint());
- exceptions.accessDeniedHandler(new HerodotusAccessDeniedHandler());
- })
- .oauth2ResourceServer(oauth2ResourceServerConfigurerCustomer)
- .with(new OAuth2FormLoginSecureConfigurer<>(userDetailsService, authenticationProperties, captchaRendererFactory, httpCryptoProcessor), (configurer) -> {});
+ .authorizeHttpRequests(authorizationConfigurerManager.getOAuth2AuthorizeHttpRequestsConfigurerCustomer())
+ .sessionManagement(authorizationConfigurerManager.getOAuth2SessionManagementConfigurerCustomer())
+ .exceptionHandling(authorizationConfigurerManager.getOAuth2ExceptionHandlingConfigurerCustomizer())
+ .oauth2ResourceServer(authorizationConfigurerManager.getOAuth2ResourceServerConfigurerCustomer())
+ .with(new OAuth2FormLoginSecureConfigurer<>(userDetailsService, authenticationConfigurerManager.getOAuth2AuthenticationProperties(), captchaRendererFactory, authenticationConfigurerManager.getHttpCryptoProcessor()), (configurer) -> {
+ });
// @formatter:on
return httpSecurity.build();
@@ -104,28 +93,11 @@ public class DefaultSecurityAutoConfiguration {
return PasswordEncoderFactories.createDelegatingPasswordEncoder();
}
- @Bean
- public AuthenticationEventPublisher authenticationEventPublisher(ApplicationContext applicationContext) {
- DefaultOAuth2AuthenticationEventPublisher publisher = new DefaultOAuth2AuthenticationEventPublisher(applicationContext);
- // 设置默认的错误 Event 类型。在遇到默认字典中没有的错误时,默认抛出。
- publisher.setDefaultAuthenticationFailureEvent(AuthenticationFailureBadCredentialsEvent.class);
- log.debug("[Herodotus] |- Bean [Authentication Event Publisher] Auto Configure.");
- return publisher;
- }
-
@Bean
@ConditionalOnMissingBean
public UserDetailsService userDetailsService(StrategyUserDetailsService strategyUserDetailsService) {
HerodotusUserDetailsService herodotusUserDetailsService = new HerodotusUserDetailsService(strategyUserDetailsService);
- log.debug("[Herodotus] |- Bean [Herodotus User Details Service] Auto Configure.");
+ log.debug("[Herodotus] |- Bean [Herodotus User Details Service] Configure.");
return herodotusUserDetailsService;
}
-
- @Bean
- @ConditionalOnMissingBean
- public ClientDetailsService clientDetailsService(OAuth2ApplicationService applicationService) {
- HerodotusClientDetailsService herodotusClientDetailsService = new HerodotusClientDetailsService(applicationService);
- log.debug("[Herodotus] |- Bean [Herodotus Client Details Service] Auto Configure.");
- return herodotusClientDetailsService;
- }
}
diff --git a/packages/authentication-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/packages/authentication-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 62c0cf2221105a8cc9cc0cbef640bdcecb4d30ff..eab8e9fd675aaf3707a1c78cc61ab8302e9cd862 100644
--- a/packages/authentication-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/packages/authentication-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1,4 +1,2 @@
-org.dromara.dante.authentication.autoconfigure.AuthenticationAutoConfiguration
-org.dromara.dante.authentication.autoconfigure.ArchitectureStrategyAutoConfiguration
org.dromara.dante.authentication.autoconfigure.DefaultSecurityAutoConfiguration
-org.dromara.dante.authentication.autoconfigure.AuthorizationServerAutoConfiguration
\ No newline at end of file
+org.dromara.dante.authentication.autoconfigure.AuthorizationAutoConfiguration
\ No newline at end of file
diff --git a/packages/service-spring-boot-starter/pom.xml b/packages/authorization-servlet-spring-boot-starter/pom.xml
similarity index 85%
rename from packages/service-spring-boot-starter/pom.xml
rename to packages/authorization-servlet-spring-boot-starter/pom.xml
index 8dcd23ba74836dd51dd3774aa4ddc0fbf5698652..388c4850abc47ae9b0e9d343568436f6ae111aa2 100644
--- a/packages/service-spring-boot-starter/pom.xml
+++ b/packages/authorization-servlet-spring-boot-starter/pom.xml
@@ -32,21 +32,26 @@
packages
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
- service-spring-boot-starter
+ authorization-servlet-spring-boot-starter
cn.herodotus.engine
- oauth2-resource-server-autoconfigure
+ oauth2-authorization-autoconfigure
org.dromara.dante
facility-spring-boot-starter
+
+
+ cn.herodotus.engine
+ webmvc-spring-boot-starter
+
\ No newline at end of file
diff --git a/packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ResourceServerAutoConfiguration.java b/packages/authorization-servlet-spring-boot-starter/src/main/java/org/dromara/dante/authorization/servlet/autoconfigure/AuthorizationServletAutoConfiguration.java
similarity index 67%
rename from packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ResourceServerAutoConfiguration.java
rename to packages/authorization-servlet-spring-boot-starter/src/main/java/org/dromara/dante/authorization/servlet/autoconfigure/AuthorizationServletAutoConfiguration.java
index 20087d3d31433c121b1cefa8947c62ad39032fdc..919d81f0dfb90adca82d68b670e3e18e8dcec8a5 100644
--- a/packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ResourceServerAutoConfiguration.java
+++ b/packages/authorization-servlet-spring-boot-starter/src/main/java/org/dromara/dante/authorization/servlet/autoconfigure/AuthorizationServletAutoConfiguration.java
@@ -23,11 +23,9 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.service.autoconfigure;
+package org.dromara.dante.authorization.servlet.autoconfigure;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2AuthorizeHttpRequestsConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2ResourceServerConfigurerCustomer;
-import cn.herodotus.engine.oauth2.authorization.customizer.OAuth2SessionManagementConfigurerCustomer;
+import cn.herodotus.engine.oauth2.authorization.servlet.ServletOAuth2AuthorizationConfigurerManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
@@ -45,25 +43,24 @@ import org.springframework.security.web.SecurityFilterChain;
*/
@AutoConfiguration
@EnableWebSecurity
-public class ResourceServerAutoConfiguration {
+public class AuthorizationServletAutoConfiguration {
- private static final Logger log = LoggerFactory.getLogger(ResourceServerAutoConfiguration.class);
+ private static final Logger log = LoggerFactory.getLogger(AuthorizationServletAutoConfiguration.class);
@Bean
public SecurityFilterChain securityFilterChain(
HttpSecurity httpSecurity,
- OAuth2SessionManagementConfigurerCustomer oauth2SessionManagementConfigurerCustomer,
- OAuth2ResourceServerConfigurerCustomer oauth2ResourceServerConfigurerCustomer,
- OAuth2AuthorizeHttpRequestsConfigurerCustomer oauth2AuthorizeHttpRequestsConfigurerCustomer
+ ServletOAuth2AuthorizationConfigurerManager authorizationConfigurerManager
) throws Exception {
- log.debug("[Herodotus] |- Bean [Resource Server Security Filter Chain] Auto Configure.");
+ log.debug("[Herodotus] |- Bean [Resource Server Security Filter Chain] Configure.");
httpSecurity.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
- httpSecurity.authorizeHttpRequests(oauth2AuthorizeHttpRequestsConfigurerCustomer)
- .sessionManagement(oauth2SessionManagementConfigurerCustomer)
- .oauth2ResourceServer(oauth2ResourceServerConfigurerCustomer);
+ httpSecurity.authorizeHttpRequests(authorizationConfigurerManager.getOAuth2AuthorizeHttpRequestsConfigurerCustomer())
+ .sessionManagement(authorizationConfigurerManager.getOAuth2SessionManagementConfigurerCustomer())
+ .exceptionHandling(authorizationConfigurerManager.getOAuth2ExceptionHandlingConfigurerCustomizer())
+ .oauth2ResourceServer(authorizationConfigurerManager.getOAuth2ResourceServerConfigurerCustomer());
return httpSecurity.build();
}
diff --git a/packages/authorization-servlet-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/packages/authorization-servlet-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000000000000000000000000000000000000..abf64c4828b676d57ede741871eb3f76f774af61
--- /dev/null
+++ b/packages/authorization-servlet-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+org.dromara.dante.authorization.servlet.autoconfigure.AuthorizationServletAutoConfiguration
\ No newline at end of file
diff --git a/packages/facility-spring-boot-starter/pom.xml b/packages/facility-spring-boot-starter/pom.xml
index 2d698f2d354eca3873a458bdfc3c1401013c97c9..6124d4a573ffff845efcbcfe1de62d9c651ea8d3 100644
--- a/packages/facility-spring-boot-starter/pom.xml
+++ b/packages/facility-spring-boot-starter/pom.xml
@@ -30,7 +30,7 @@
packages
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
4.0.0
diff --git a/packages/facility-spring-boot-starter/src/main/java/org/dromara/dante/facility/autoconfigure/FacilityAutoConfiguration.java b/packages/facility-spring-boot-starter/src/main/java/org/dromara/dante/facility/autoconfigure/FacilityAutoConfiguration.java
index 8a7d945cc892b25bb3edc4c759f9c447d28d9db9..d0ed2276a7ad3627822e1fc4907269f0538cba47 100644
--- a/packages/facility-spring-boot-starter/src/main/java/org/dromara/dante/facility/autoconfigure/FacilityAutoConfiguration.java
+++ b/packages/facility-spring-boot-starter/src/main/java/org/dromara/dante/facility/autoconfigure/FacilityAutoConfiguration.java
@@ -43,6 +43,6 @@ public class FacilityAutoConfiguration {
@PostConstruct
public void postConstruct() {
- log.info("[Herodotus] |- Module [Herodotus Facility Starter] Auto Configure.");
+ log.info("[Herodotus] |- Starter [Herodotus Facility] Configure.");
}
}
diff --git a/packages/pom.xml b/packages/pom.xml
index c0c72489567d0822eb92e811aa4136f976f0b420..7c1150e95873575bc7e5895289ce690a21e80984 100644
--- a/packages/pom.xml
+++ b/packages/pom.xml
@@ -32,7 +32,7 @@
dante-cloud
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
packages
@@ -66,8 +66,10 @@
authentication-spring-boot-starter
- service-spring-boot-starter
+ authorization-servlet-spring-boot-starter
facility-spring-boot-starter
+ rpc-client-uaa-spring-boot-starter
+ rpc-server-upms-spring-boot-starter
\ No newline at end of file
diff --git a/modules/dante-module-strategy/pom.xml b/packages/rpc-client-uaa-spring-boot-starter/pom.xml
similarity index 79%
rename from modules/dante-module-strategy/pom.xml
rename to packages/rpc-client-uaa-spring-boot-starter/pom.xml
index 266e7f8b82330b5cf18f466b902610d3f1be3b01..70888f64c74fb627a15db029a86ebcbd910029f5 100644
--- a/modules/dante-module-strategy/pom.xml
+++ b/packages/rpc-client-uaa-spring-boot-starter/pom.xml
@@ -28,28 +28,34 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- modules
org.dromara.dante
- 3.5.5.2
+ packages
+ 3.5.5.3
- dante-module-strategy
+ rpc-client-uaa-spring-boot-starter
cn.herodotus.engine
- rest-sdk-condition
+ oauth2-core
+
org.dromara.dante
- dante-module-social
+ dante-module-common
- org.dromara.dante
- dante-module-common
+ cn.herodotus.engine
+ logic-module-upms
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/DistributedArchitectureConfiguration.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/DistributedArchitectureConfiguration.java
similarity index 44%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/DistributedArchitectureConfiguration.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/DistributedArchitectureConfiguration.java
index 4db778d8fb041c9b3cb64acf504d7743e6e4156c..41159e011b0bf7149421e87d9006b2cb5baba2d2 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/DistributedArchitectureConfiguration.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/DistributedArchitectureConfiguration.java
@@ -23,33 +23,32 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.config;
+package org.dromara.dante.rpc.client.uaa.autoconfigure;
-import org.dromara.dante.module.social.config.SocialModuleConfiguration;
-import org.dromara.dante.module.strategy.feign.RemoteAuthorityDetailsService;
-import org.dromara.dante.module.strategy.feign.RemoteSocialDetailsService;
-import org.dromara.dante.module.strategy.feign.RemoteUserDetailsService;
-import org.dromara.dante.module.strategy.service.HerodotusLocalPermissionDetailsService;
-import org.dromara.dante.module.strategy.service.HerodotusLocalUserDetailsService;
-import org.dromara.dante.module.strategy.service.HerodotusRemotePermissionDetailsService;
-import org.dromara.dante.module.strategy.service.HerodotusRemoteUserDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.handler.SocialAuthenticationHandler;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyPermissionDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyUserDetailsService;
-import cn.herodotus.engine.rest.condition.annotation.ConditionalOnDistributedArchitecture;
-import cn.herodotus.engine.rest.condition.annotation.ConditionalOnLocalDataAccess;
-import cn.herodotus.engine.rest.condition.annotation.ConditionalOnRemoteDataAccess;
-import cn.herodotus.engine.supplier.upms.logic.configuration.SupplierUpmsLogicConfiguration;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysPermissionService;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
+import cn.herodotus.engine.core.foundation.condition.ConditionalOnArchitecture;
+import cn.herodotus.engine.core.foundation.enums.Architecture;
+import cn.herodotus.engine.core.foundation.enums.DataAccessStrategy;
+import cn.herodotus.engine.core.identity.strategy.StrategyPermissionDetailsService;
+import cn.herodotus.engine.core.identity.strategy.StrategyUserDetailsService;
+import cn.herodotus.engine.logic.upms.annotation.EnableHerodotusLogicUpms;
+import cn.herodotus.engine.logic.upms.definition.SocialAuthenticationHandler;
+import cn.herodotus.engine.logic.upms.service.security.SysPermissionService;
+import cn.herodotus.engine.logic.upms.service.security.SysUserService;
+import cn.herodotus.engine.web.core.condition.ConditionalOnDataAccessStrategy;
import jakarta.annotation.PostConstruct;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.FeignStrategyPermissionDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.FeignStrategyUserDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteAuthorityDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteSocialDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteUserDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.local.LocalStrategyPermissionDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.local.LocalStrategyUserDetailsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
/**
* Description: 分布式架构配置
@@ -58,55 +57,57 @@ import org.springframework.context.annotation.Import;
* @date : 2022/2/1 21:26
*/
@Configuration(proxyBeanMethods = false)
-@ConditionalOnDistributedArchitecture
+@ConditionalOnArchitecture(Architecture.DISTRIBUTED)
public class DistributedArchitectureConfiguration {
private static final Logger log = LoggerFactory.getLogger(DistributedArchitectureConfiguration.class);
@PostConstruct
public void postConstruct() {
- log.debug("[Herodotus] |- Module [Distributed Architecture] Auto Configure.");
+ log.debug("[Herodotus] |- Auto [Distributed Architecture] Configure.");
}
@Configuration(proxyBeanMethods = false)
- @ConditionalOnLocalDataAccess
- @Import({SupplierUpmsLogicConfiguration.class, SocialModuleConfiguration.class})
+ @ConditionalOnDataAccessStrategy(DataAccessStrategy.LOCAL)
+ @EnableHerodotusLogicUpms
static class DataAccessStrategyLocalConfiguration {
@Bean
@ConditionalOnMissingBean
- public StrategyUserDetailsService herodotusLocalUserDetailsService(SysUserService sysUserService, SocialAuthenticationHandler socialAuthenticationHandler) {
- log.debug("[Herodotus] |- Strategy [Local User Details Service] Auto Configure.");
- return new HerodotusLocalUserDetailsService(sysUserService, socialAuthenticationHandler);
+ public StrategyUserDetailsService localStrategyUserDetailsService(SysUserService sysUserService, SocialAuthenticationHandler socialAuthenticationHandler) {
+ LocalStrategyUserDetailsService service = new LocalStrategyUserDetailsService(sysUserService, socialAuthenticationHandler);
+ log.debug("[Herodotus] |- Strategy [Local User Details Service] Configure.");
+ return service;
}
@Bean
@ConditionalOnMissingBean
- public StrategyPermissionDetailsService herodotusLocalPermissionDetailsService(SysPermissionService sysPermissionService) {
- HerodotusLocalPermissionDetailsService herodotusLocalPermissionDetailsService = new HerodotusLocalPermissionDetailsService(sysPermissionService);
- log.debug("[Herodotus] |- Strategy [Local Permission Details Service] Auto Configure.");
- return herodotusLocalPermissionDetailsService;
+ public StrategyPermissionDetailsService localStrategyPermissionDetailsService(SysPermissionService sysPermissionService) {
+ LocalStrategyPermissionDetailsService service = new LocalStrategyPermissionDetailsService(sysPermissionService);
+ log.debug("[Herodotus] |- Strategy [Local Permission Details Service] Configure.");
+ return service;
}
}
@Configuration(proxyBeanMethods = false)
- @ConditionalOnRemoteDataAccess
- @EnableFeignClients(basePackages = {"org.dromara.dante.module.strategy.feign"})
+ @ConditionalOnDataAccessStrategy(DataAccessStrategy.REMOTE)
+ @EnableFeignClients(basePackages = {"org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api"})
static class DataAccessStrategyRemoteConfiguration {
@Bean
@ConditionalOnMissingBean
- public StrategyUserDetailsService herodotusRemoteUserDetailsService(RemoteUserDetailsService remoteUserDetailsService, RemoteSocialDetailsService remoteSocialDetailsService) {
- log.debug("[Herodotus] |- Strategy [Remote User Details Service] Auto Configure.");
- return new HerodotusRemoteUserDetailsService(remoteUserDetailsService, remoteSocialDetailsService);
+ public StrategyUserDetailsService feignStrategyUserDetailsService(RemoteUserDetailsService remoteUserDetailsService, RemoteSocialDetailsService remoteSocialDetailsService) {
+ FeignStrategyUserDetailsService service = new FeignStrategyUserDetailsService(remoteUserDetailsService, remoteSocialDetailsService);
+ log.debug("[Herodotus] |- Strategy [Remote User Details Service] Configure.");
+ return service;
}
@Bean
@ConditionalOnMissingBean
- public StrategyPermissionDetailsService herodotusRemotePermissionDetailsService(RemoteAuthorityDetailsService remoteAuthorityDetailsService) {
- HerodotusRemotePermissionDetailsService herodotusRemotePermissionDetailsService = new HerodotusRemotePermissionDetailsService(remoteAuthorityDetailsService);
- log.debug("[Herodotus] |- Strategy [Remote Permission Details Service] Auto Configure.");
- return herodotusRemotePermissionDetailsService;
+ public StrategyPermissionDetailsService feignStrategyPermissionDetailsService(RemoteAuthorityDetailsService remoteAuthorityDetailsService) {
+ FeignStrategyPermissionDetailsService service = new FeignStrategyPermissionDetailsService(remoteAuthorityDetailsService);
+ log.debug("[Herodotus] |- Strategy [Remote Permission Details Service] Configure.");
+ return service;
}
}
}
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/MonocoqueArchitectureConfiguration.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/MonocoqueArchitectureConfiguration.java
similarity index 61%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/MonocoqueArchitectureConfiguration.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/MonocoqueArchitectureConfiguration.java
index b057c9e3dd133c78746743b40250113d4e2f0815..00f5ecbafdd6f2ef7664264df1092d2c695a2c05 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/config/MonocoqueArchitectureConfiguration.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/MonocoqueArchitectureConfiguration.java
@@ -23,25 +23,24 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.config;
+package org.dromara.dante.rpc.client.uaa.autoconfigure;
-import org.dromara.dante.module.social.config.SocialModuleConfiguration;
-import org.dromara.dante.module.strategy.service.HerodotusLocalPermissionDetailsService;
-import org.dromara.dante.module.strategy.service.HerodotusLocalUserDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.handler.SocialAuthenticationHandler;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyPermissionDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyUserDetailsService;
-import cn.herodotus.engine.rest.condition.annotation.ConditionalOnMonocoqueArchitecture;
-import cn.herodotus.engine.supplier.upms.logic.configuration.SupplierUpmsLogicConfiguration;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysPermissionService;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
+import cn.herodotus.engine.core.foundation.condition.ConditionalOnArchitecture;
+import cn.herodotus.engine.core.foundation.enums.Architecture;
+import cn.herodotus.engine.core.identity.strategy.StrategyPermissionDetailsService;
+import cn.herodotus.engine.core.identity.strategy.StrategyUserDetailsService;
+import cn.herodotus.engine.logic.upms.annotation.EnableHerodotusLogicUpms;
+import cn.herodotus.engine.logic.upms.definition.SocialAuthenticationHandler;
+import cn.herodotus.engine.logic.upms.service.security.SysPermissionService;
+import cn.herodotus.engine.logic.upms.service.security.SysUserService;
import jakarta.annotation.PostConstruct;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.local.LocalStrategyPermissionDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.local.LocalStrategyUserDetailsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
/**
* Description: 单体式架构配置
@@ -50,29 +49,30 @@ import org.springframework.context.annotation.Import;
* @date : 2022/2/1 21:27
*/
@Configuration(proxyBeanMethods = false)
-@ConditionalOnMonocoqueArchitecture
-@Import({SupplierUpmsLogicConfiguration.class, SocialModuleConfiguration.class})
+@ConditionalOnArchitecture(Architecture.MONOCOQUE)
+@EnableHerodotusLogicUpms
public class MonocoqueArchitectureConfiguration {
private static final Logger log = LoggerFactory.getLogger(MonocoqueArchitectureConfiguration.class);
@PostConstruct
public void postConstruct() {
- log.debug("[Herodotus] |- SDK [Module Monocoque Architecture] Auto Configure.");
+ log.debug("[Herodotus] |- Auto [Module Monocoque Architecture] Configure.");
}
@Bean
@ConditionalOnMissingBean
public StrategyPermissionDetailsService herodotusLocalPermissionDetailsService(SysPermissionService sysPermissionService) {
- HerodotusLocalPermissionDetailsService herodotusLocalPermissionDetailsService = new HerodotusLocalPermissionDetailsService(sysPermissionService);
- log.debug("[Herodotus] |- Strategy [Local Permission Details Service] Auto Configure.");
- return herodotusLocalPermissionDetailsService;
+ LocalStrategyPermissionDetailsService service = new LocalStrategyPermissionDetailsService(sysPermissionService);
+ log.debug("[Herodotus] |- Strategy [Local Permission Details Service] Configure.");
+ return service;
}
@Bean
@ConditionalOnMissingBean
public StrategyUserDetailsService herodotusLocalUserDetailsService(SysUserService sysUserService, SocialAuthenticationHandler socialAuthenticationHandler) {
- log.debug("[Herodotus] |- Strategy [Local User Details Service] Auto Configure.");
- return new HerodotusLocalUserDetailsService(sysUserService, socialAuthenticationHandler);
+ LocalStrategyUserDetailsService service = new LocalStrategyUserDetailsService(sysUserService, socialAuthenticationHandler);
+ log.debug("[Herodotus] |- Strategy [Local User Details Service] Configure.");
+ return service;
}
}
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyPermissionDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyPermissionDetailsService.java
similarity index 87%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyPermissionDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyPermissionDetailsService.java
index 0da2d341e0a8de9c33ce7ebbac8234ad24159e27..337cf27453b6c42e5edaac9c5dfb7fa32d7aa8c0 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyPermissionDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyPermissionDetailsService.java
@@ -23,11 +23,11 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.definition;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.definition;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusPermission;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyPermissionDetailsService;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission;
+import cn.herodotus.engine.core.identity.domain.HerodotusPermission;
+import cn.herodotus.engine.core.identity.strategy.StrategyPermissionDetailsService;
+import cn.herodotus.engine.logic.upms.entity.security.SysPermission;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyUserDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyUserDetailsService.java
similarity index 85%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyUserDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyUserDetailsService.java
index 6185741238197bd41bd13d9b918b2189246d5b93..602cfdbd0862a5f881fab1f5c57d27aa3fb12e24 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/definition/AbstractStrategyUserDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/definition/AbstractStrategyUserDetailsService.java
@@ -23,12 +23,12 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.definition;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.definition;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser;
-import cn.herodotus.engine.oauth2.core.definition.strategy.StrategyUserDetailsService;
-import cn.herodotus.engine.supplier.upms.logic.converter.SysUserToHerodotusUserConverter;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser;
+import cn.herodotus.engine.core.identity.domain.HerodotusUser;
+import cn.herodotus.engine.core.identity.strategy.StrategyUserDetailsService;
+import cn.herodotus.engine.logic.upms.converter.SysUserToHerodotusUserConverter;
+import cn.herodotus.engine.logic.upms.entity.security.SysUser;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.core.convert.converter.Converter;
import org.springframework.security.core.AuthenticationException;
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemotePermissionDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyPermissionDetailsService.java
similarity index 74%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemotePermissionDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyPermissionDetailsService.java
index 5b6ce4d849260c17666a5ac30a62a560c70781b8..54b8b17a8b48ae1c2388cac87b7c78ea79505616 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemotePermissionDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyPermissionDetailsService.java
@@ -23,14 +23,14 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.service;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.feign;
-import org.dromara.dante.module.strategy.definition.AbstractStrategyPermissionDetailsService;
-import org.dromara.dante.module.strategy.feign.RemoteAuthorityDetailsService;
-import cn.herodotus.engine.assistant.definition.domain.Result;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusPermission;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.identity.domain.HerodotusPermission;
+import cn.herodotus.engine.logic.upms.entity.security.SysPermission;
import org.apache.commons.collections4.CollectionUtils;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.definition.AbstractStrategyPermissionDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteAuthorityDetailsService;
import java.util.ArrayList;
import java.util.List;
@@ -41,11 +41,11 @@ import java.util.List;
* @author : gengwei.zheng
* @date : 2022/4/1 19:01
*/
-public class HerodotusRemotePermissionDetailsService extends AbstractStrategyPermissionDetailsService {
+public class FeignStrategyPermissionDetailsService extends AbstractStrategyPermissionDetailsService {
private final RemoteAuthorityDetailsService remoteAuthorityDetailsService;
- public HerodotusRemotePermissionDetailsService(RemoteAuthorityDetailsService remoteAuthorityDetailsService) {
+ public FeignStrategyPermissionDetailsService(RemoteAuthorityDetailsService remoteAuthorityDetailsService) {
this.remoteAuthorityDetailsService = remoteAuthorityDetailsService;
}
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemoteUserDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyUserDetailsService.java
similarity index 73%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemoteUserDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyUserDetailsService.java
index 2a320445fd12d90731beb105a47b57021a3583d0..ddb31bcbb9b990e0b94e966775cf592c6a757414 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusRemoteUserDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/FeignStrategyUserDetailsService.java
@@ -23,15 +23,15 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.service;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.feign;
-import org.dromara.dante.module.strategy.definition.AbstractStrategyUserDetailsService;
-import org.dromara.dante.module.strategy.feign.RemoteSocialDetailsService;
-import org.dromara.dante.module.strategy.feign.RemoteUserDetailsService;
-import cn.herodotus.engine.assistant.definition.domain.Result;
-import cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.identity.domain.AccessPrincipal;
+import cn.herodotus.engine.core.identity.domain.HerodotusUser;
+import cn.herodotus.engine.logic.upms.entity.security.SysUser;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.definition.AbstractStrategyUserDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteSocialDetailsService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api.RemoteUserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
/**
@@ -40,12 +40,12 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
* @author : gengwei.zheng
* @date : 2021/5/23 9:21
*/
-public class HerodotusRemoteUserDetailsService extends AbstractStrategyUserDetailsService {
+public class FeignStrategyUserDetailsService extends AbstractStrategyUserDetailsService {
private final RemoteUserDetailsService remoteUserDetailsService;
private final RemoteSocialDetailsService remoteSocialDetailsService;
- public HerodotusRemoteUserDetailsService(RemoteUserDetailsService remoteUserDetailsService, RemoteSocialDetailsService remoteSocialDetailsService) {
+ public FeignStrategyUserDetailsService(RemoteUserDetailsService remoteUserDetailsService, RemoteSocialDetailsService remoteSocialDetailsService) {
this.remoteUserDetailsService = remoteUserDetailsService;
this.remoteSocialDetailsService = remoteSocialDetailsService;
}
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteAuthorityDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteAuthorityDetailsService.java
similarity index 90%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteAuthorityDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteAuthorityDetailsService.java
index a5bd69fc8d638042c9f371b583e0519cc9fcd668..e91e2a93f6090c1553d38dcde79621526441fdb6 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteAuthorityDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteAuthorityDetailsService.java
@@ -23,11 +23,11 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.feign;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.logic.upms.entity.security.SysPermission;
import org.dromara.dante.module.common.ServiceNameConstants;
-import cn.herodotus.engine.assistant.definition.domain.Result;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteSocialDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteSocialDetailsService.java
similarity index 86%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteSocialDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteSocialDetailsService.java
index 46ee16e8b0a4231a6c5b26da224d79bfe7059cd7..c724c9b7e0ea2df50f68a1a974bfba4178aa1c89 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteSocialDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteSocialDetailsService.java
@@ -23,13 +23,13 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.feign;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api;
+import cn.herodotus.engine.core.definition.annotation.Inner;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.identity.domain.AccessPrincipal;
+import cn.herodotus.engine.core.identity.domain.HerodotusUser;
import org.dromara.dante.module.common.ServiceNameConstants;
-import cn.herodotus.engine.assistant.definition.domain.Result;
-import cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser;
-import cn.herodotus.engine.rest.core.annotation.Inner;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteUserDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteUserDetailsService.java
similarity index 88%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteUserDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteUserDetailsService.java
index f0f7ea1961df2c3dcac7af88aae633df35704658..9a104b0cc561f10f26519a9ffe8167e8233a13bb 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/feign/RemoteUserDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/feign/api/RemoteUserDetailsService.java
@@ -23,12 +23,12 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.feign;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.feign.api;
+import cn.herodotus.engine.core.definition.annotation.Inner;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.logic.upms.entity.security.SysUser;
import org.dromara.dante.module.common.ServiceNameConstants;
-import cn.herodotus.engine.assistant.definition.domain.Result;
-import cn.herodotus.engine.rest.core.annotation.Inner;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalPermissionDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyPermissionDetailsService.java
similarity index 76%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalPermissionDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyPermissionDetailsService.java
index bc6a0a8c5e91d2c77aafef382df8fb70bbc5730c..60e3f3f1640e326adb3defc1b2ec3b5c5f6c20f7 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalPermissionDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyPermissionDetailsService.java
@@ -23,13 +23,13 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.service;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.local;
-import org.dromara.dante.module.strategy.definition.AbstractStrategyPermissionDetailsService;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusPermission;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysPermissionService;
+import cn.herodotus.engine.core.identity.domain.HerodotusPermission;
+import cn.herodotus.engine.logic.upms.entity.security.SysPermission;
+import cn.herodotus.engine.logic.upms.service.security.SysPermissionService;
import org.apache.commons.collections4.CollectionUtils;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.definition.AbstractStrategyPermissionDetailsService;
import java.util.ArrayList;
import java.util.List;
@@ -40,11 +40,11 @@ import java.util.List;
* @author : gengwei.zheng
* @date : 2022/4/1 18:56
*/
-public class HerodotusLocalPermissionDetailsService extends AbstractStrategyPermissionDetailsService {
+public class LocalStrategyPermissionDetailsService extends AbstractStrategyPermissionDetailsService {
private final SysPermissionService sysPermissionService;
- public HerodotusLocalPermissionDetailsService(SysPermissionService sysPermissionService) {
+ public LocalStrategyPermissionDetailsService(SysPermissionService sysPermissionService) {
this.sysPermissionService = sysPermissionService;
}
diff --git a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalUserDetailsService.java b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyUserDetailsService.java
similarity index 73%
rename from modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalUserDetailsService.java
rename to packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyUserDetailsService.java
index ea9c691721cdfada91b0c06a9f57ff356c02b3bf..8ba153e2dc7913dcbe59f6137fc969c3a2a6728d 100644
--- a/modules/dante-module-strategy/src/main/java/org/dromara/dante/module/strategy/service/HerodotusLocalUserDetailsService.java
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/java/org/dromara/dante/rpc/client/uaa/autoconfigure/local/LocalStrategyUserDetailsService.java
@@ -23,14 +23,14 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.strategy.service;
+package org.dromara.dante.rpc.client.uaa.autoconfigure.local;
-import org.dromara.dante.module.strategy.definition.AbstractStrategyUserDetailsService;
-import cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal;
-import cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser;
-import cn.herodotus.engine.oauth2.core.definition.handler.SocialAuthenticationHandler;
-import cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
+import cn.herodotus.engine.core.identity.domain.AccessPrincipal;
+import cn.herodotus.engine.core.identity.domain.HerodotusUser;
+import cn.herodotus.engine.logic.upms.definition.SocialAuthenticationHandler;
+import cn.herodotus.engine.logic.upms.entity.security.SysUser;
+import cn.herodotus.engine.logic.upms.service.security.SysUserService;
+import org.dromara.dante.rpc.client.uaa.autoconfigure.definition.AbstractStrategyUserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
/**
@@ -39,12 +39,12 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
* @author : gengwei.zheng
* @date : 2021/5/23 9:20
*/
-public class HerodotusLocalUserDetailsService extends AbstractStrategyUserDetailsService {
+public class LocalStrategyUserDetailsService extends AbstractStrategyUserDetailsService {
private final SysUserService sysUserService;
private final SocialAuthenticationHandler socialAuthenticationHandler;
- public HerodotusLocalUserDetailsService(SysUserService sysUserService, SocialAuthenticationHandler socialAuthenticationHandler) {
+ public LocalStrategyUserDetailsService(SysUserService sysUserService, SocialAuthenticationHandler socialAuthenticationHandler) {
this.sysUserService = sysUserService;
this.socialAuthenticationHandler = socialAuthenticationHandler;
}
diff --git a/packages/rpc-client-uaa-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/packages/rpc-client-uaa-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000000000000000000000000000000000000..1c2cf70f81df3ce22dddb964687196dfd5138c63
--- /dev/null
+++ b/packages/rpc-client-uaa-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1,27 @@
+#
+# Copyright 2020-2030 码匠君
+#
+# Dante Cloud 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.
+#
+# Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
+#
+# 1. 请不要删除和修改根目录下的LICENSE文件。
+# 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
+# 3. 请保留源码和相关描述文件的项目出处,作者声明等。
+# 4. 分发源码时候,请注明软件出处
+# 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
+# 6. 若您的项目无法满足以上几点,可申请商业授权
+#
+
+org.dromara.dante.rpc.client.uaa.autoconfigure.DistributedArchitectureConfiguration
+org.dromara.dante.rpc.client.uaa.autoconfigure.MonocoqueArchitectureConfiguration
\ No newline at end of file
diff --git a/modules/dante-module-social/pom.xml b/packages/rpc-server-upms-spring-boot-starter/pom.xml
similarity index 87%
rename from modules/dante-module-social/pom.xml
rename to packages/rpc-server-upms-spring-boot-starter/pom.xml
index 9f6643b5ec9a743c41a979b42a69a9b54ef10f41..084326770385a42b7a448acf654eca0cc44d4111 100644
--- a/modules/dante-module-social/pom.xml
+++ b/packages/rpc-server-upms-spring-boot-starter/pom.xml
@@ -28,24 +28,23 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- modules
org.dromara.dante
- 3.5.5.2
+ packages
+ 3.5.5.3
- dante-module-social
+ rpc-server-upms-spring-boot-starter
cn.herodotus.engine
- supplier-sdk-upms-logic
+ oauth2-authorization-autoconfigure
cn.herodotus.engine
- access-sdk-all
+ rest-module-servlet-upms
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/config/MetadataModuleConfiguration.java b/packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/RpcServerUpmsAutoConfiguration.java
similarity index 67%
rename from modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/config/MetadataModuleConfiguration.java
rename to packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/RpcServerUpmsAutoConfiguration.java
index cf37abde8eef7ada29eac1cbc198bd6885eb5c5e..1e5ec6fec9c7add9b95c5d2df2bff72f6a721f08 100644
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/config/MetadataModuleConfiguration.java
+++ b/packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/RpcServerUpmsAutoConfiguration.java
@@ -23,38 +23,38 @@
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.metadata.config;
+package org.dromara.dante.rpc.server.upms.autoconfigure;
-import cn.herodotus.engine.supplier.upms.rest.configuration.SupplierUpmsRestConfiguration;
+import cn.herodotus.engine.rest.servlet.upms.annotation.EnableHerodotusRestServletUpms;
import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
/**
- * Description: UpmsRest配置类
+ * Description: Rpc Server Upms 自动配置
*
* @author : gengwei.zheng
- * @date : 2021/1/5 11:58
+ * @date : 2024/4/24 23:12
*/
-@Configuration(proxyBeanMethods = false)
-@ComponentScan(basePackages = {
- "org.dromara.dante.module.metadata.processor",
- "org.dromara.dante.module.metadata.listener",
-})
-@Import({
- SupplierUpmsRestConfiguration.class
-})
-public class MetadataModuleConfiguration {
+@AutoConfiguration
+@EnableHerodotusRestServletUpms
+public class RpcServerUpmsAutoConfiguration {
- private static final Logger log = LoggerFactory.getLogger(MetadataModuleConfiguration.class);
+ private static final Logger log = LoggerFactory.getLogger(RpcServerUpmsAutoConfiguration.class);
@PostConstruct
public void postConstruct() {
- log.info("[Herodotus] |- SDK [Metadata Module] Auto Configure.");
+ log.info("[Herodotus] |- Starter [Rpc Server Upms] Configure.");
}
+ @Configuration(proxyBeanMethods = false)
+ @ComponentScan(basePackages = {
+ "org.dromara.dante.rpc.server.upms.autoconfigure.feign"
+ })
+ static class FeignConfiguration {
-}
+ }
+}
\ No newline at end of file
diff --git a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteChangeUserStatusListener.java b/packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/feign/SocialSignInController.java
similarity index 33%
rename from modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteChangeUserStatusListener.java
rename to packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/feign/SocialSignInController.java
index a06c01a6b36a5d1744ad6dab690af561adf4447c..37ea3a8b88d286d7e44d1560f0897bd465c9d6eb 100644
--- a/modules/dante-module-metadata/src/main/java/org/dromara/dante/module/metadata/listener/RemoteChangeUserStatusListener.java
+++ b/packages/rpc-server-upms-spring-boot-starter/src/main/java/org/dromara/dante/rpc/server/upms/autoconfigure/feign/SocialSignInController.java
@@ -1,7 +1,7 @@
/*
* Copyright 2020-2030 码匠君
*
- * Dante Cloud licensed under the Apache License, Version 2.0 (the "License");
+ * Dante Engine 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
*
@@ -13,63 +13,63 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
+ * Dante Engine 是 Dante Cloud 系统核心组件库,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
*
* 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
+ * 2. 请不要删除和修改 Dante Engine 源码头部的版权声明。
* 3. 请保留源码和相关描述文件的项目出处,作者声明等。
* 4. 分发源码时候,请注明软件出处
* 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
* 6. 若您的项目无法满足以上几点,可申请商业授权
*/
-package org.dromara.dante.module.metadata.listener;
+package org.dromara.dante.rpc.server.upms.autoconfigure.feign;
-import cn.herodotus.engine.assistant.core.json.jackson2.utils.Jackson2Utils;
-import cn.herodotus.engine.data.core.enums.DataItemStatus;
-import cn.herodotus.engine.message.core.logic.domain.UserStatus;
-import cn.herodotus.engine.oauth2.resource.autoconfigure.bus.RemoteChangeUserStatusEvent;
-import cn.herodotus.engine.supplier.upms.logic.service.security.SysUserService;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.identity.domain.AccessPrincipal;
+import cn.herodotus.engine.core.identity.domain.HerodotusUser;
+import cn.herodotus.engine.logic.upms.definition.AbstractSocialAuthenticationHandler;
+import cn.herodotus.engine.logic.upms.definition.SocialAuthenticationHandler;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.ObjectUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
/**
- * Description: 远程用户状态变更监听
+ * Description: 社交用户登录接口
*
* @author : gengwei.zheng
- * @date : 2022/7/10 18:31
+ * @date : 2022/6/20 18:19
*/
-@Component
-public class RemoteChangeUserStatusListener implements ApplicationListener {
+@RestController
+@RequestMapping("/security/social")
+@Tag(name = "社交用户登录接口")
+public class SocialSignInController {
- private static final Logger log = LoggerFactory.getLogger(RemoteChangeUserStatusListener.class);
-
- private final SysUserService sysUserService;
+ private final SocialAuthenticationHandler socialAuthenticationHandler;
@Autowired
- public RemoteChangeUserStatusListener(SysUserService sysUserService) {
- this.sysUserService = sysUserService;
+ public SocialSignInController(SocialAuthenticationHandler socialAuthenticationHandler) {
+ this.socialAuthenticationHandler = socialAuthenticationHandler;
}
- @Override
- public void onApplicationEvent(RemoteChangeUserStatusEvent event) {
-
- log.info("[Herodotus] |- Request mapping gather REMOTE listener, response service [{}] event!", event.getOriginService());
-
- String data = event.getData();
- log.debug("[Herodotus] |- Fetch data [{}]", data);
- if (ObjectUtils.isNotEmpty(data)) {
- UserStatus userStatus = Jackson2Utils.toObject(data, UserStatus.class);
- if (ObjectUtils.isNotEmpty(userStatus)) {
- DataItemStatus dataItemStatus = DataItemStatus.valueOf(userStatus.getStatus());
- if (ObjectUtils.isNotEmpty(dataItemStatus)) {
- sysUserService.changeStatus(userStatus.getUserId(), dataItemStatus);
- }
- }
+ @Operation(summary = "社交登录用户信息查询", description = "根据不同的source查询对应社交用户的信息")
+ @Parameters({
+ @Parameter(name = "source", required = true, description = "系统用户名", in = ParameterIn.PATH),
+ })
+ @RequestMapping("/sign-in/{source}")
+ public Result findUserDetailsBySocial(@PathVariable("source") String source, AccessPrincipal accessPrincipal) {
+ HerodotusUser herodotusUser = this.socialAuthenticationHandler.authentication(source, accessPrincipal);
+ if (ObjectUtils.isNotEmpty(herodotusUser)) {
+ return Result.success("社交登录成功", herodotusUser);
+ } else {
+ return Result.failure("社交登录失败,未能查到用户数据");
}
}
}
diff --git a/packages/rpc-server-upms-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/packages/rpc-server-upms-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000000000000000000000000000000000000..abc9418690595f0a120599a96c2189a9048440f2
--- /dev/null
+++ b/packages/rpc-server-upms-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1,26 @@
+#
+# Copyright 2020-2030 码匠君
+#
+# Dante Cloud 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.
+#
+# Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
+#
+# 1. 请不要删除和修改根目录下的LICENSE文件。
+# 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
+# 3. 请保留源码和相关描述文件的项目出处,作者声明等。
+# 4. 分发源码时候,请注明软件出处
+# 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
+# 6. 若您的项目无法满足以上几点,可申请商业授权
+#
+
+org.dromara.dante.rpc.server.upms.autoconfigure.RpcServerUpmsAutoConfiguration
\ No newline at end of file
diff --git a/packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ServiceAutoConfiguration.java b/packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ServiceAutoConfiguration.java
deleted file mode 100644
index 845d89e0796471e6bc559e6571b809072fc6eb4b..0000000000000000000000000000000000000000
--- a/packages/service-spring-boot-starter/src/main/java/org/dromara/dante/service/autoconfigure/ServiceAutoConfiguration.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.service.autoconfigure;
-
-import jakarta.annotation.PostConstruct;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-
-/**
- * Description: 服务通用Starter自动配置
- *
- * @author : gengwei.zheng
- * @date : 2022/2/17 13:44
- */
-@AutoConfiguration
-public class ServiceAutoConfiguration {
-
- private static final Logger log = LoggerFactory.getLogger(ServiceAutoConfiguration.class);
-
- @PostConstruct
- public void postConstruct() {
- log.info("[Herodotus] |- Module [Herodotus Service Starter] Auto Configure.");
- }
-}
diff --git a/packages/service-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/packages/service-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index 905bff9c9cc67ae76fbc9dd7acf1830305cd4223..0000000000000000000000000000000000000000
--- a/packages/service-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /dev/null
@@ -1,2 +0,0 @@
-org.dromara.dante.service.autoconfigure.ServiceAutoConfiguration
-org.dromara.dante.service.autoconfigure.ResourceServerAutoConfiguration
\ No newline at end of file
diff --git a/platform/dante-cloud-gateway/pom.xml b/platform/dante-cloud-gateway/pom.xml
index 409af6ac31032741fcb7206dee2af31e455ab1ad..daaed74debb43a6b371fe603c87000b9a6e04db7 100644
--- a/platform/dante-cloud-gateway/pom.xml
+++ b/platform/dante-cloud-gateway/pom.xml
@@ -32,28 +32,20 @@
platform
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
dante-cloud-gateway
- org.springdoc
- springdoc-openapi-starter-webflux-ui
-
-
- org.springframework.cloud
- spring-cloud-starter-gateway-server-webflux
-
-
- org.springframework.boot
- spring-boot-starter-webflux
+ cn.herodotus.engine
+ web-core
- org.springframework.boot
- spring-boot-starter-actuator
+ cn.herodotus.engine
+ reactive-container-spring-boot-starter
@@ -67,8 +59,8 @@
- org.springframework.boot
- spring-boot-starter-thymeleaf
+ org.springframework.cloud
+ spring-cloud-starter-gateway-server-webflux
diff --git a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/config/GatewayConfiguration.java b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/config/GatewayConfiguration.java
index 25228c97881156bddcc7e160f9e187296484a21d..b2540ed37b3e1eeca9ddefcc872fbb718aee6b92 100644
--- a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/config/GatewayConfiguration.java
+++ b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/config/GatewayConfiguration.java
@@ -25,7 +25,7 @@
package org.dromara.dante.gateway.config;
-import cn.herodotus.engine.assistant.core.annotation.ConditionalOnSwaggerEnabled;
+import cn.herodotus.engine.web.core.condition.ConditionalOnSwaggerEnabled;
import org.dromara.dante.gateway.handler.RefreshRoutesListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -98,7 +98,7 @@ public class GatewayConfiguration {
RefreshRoutesListener refreshRoutesListener = new RefreshRoutesListener();
refreshRoutesListener.setRouteLocator(routeLocator);
refreshRoutesListener.setSwaggerUiConfigProperties(swaggerUiConfigProperties);
- log.trace("[Herodotus] |- Bean [Refresh Routes Listener] in AliyunScanConfiguration Auto Configure.");
+ log.trace("[Herodotus] |- Bean [Refresh Routes Listener] in AliyunScanConfiguration Configure.");
return refreshRoutesListener;
}
}
diff --git a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalCertificationFilter.java b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalCertificationFilter.java
index 4876290d436e0a6929001f2ffd24e27434d354a5..6934a6356bc39c773c3a620e96ef587524666008 100644
--- a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalCertificationFilter.java
+++ b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalCertificationFilter.java
@@ -25,10 +25,10 @@
package org.dromara.dante.gateway.filter;
-import cn.herodotus.engine.assistant.core.utils.http.HeaderUtils;
-import cn.herodotus.engine.assistant.definition.constants.BaseConstants;
-import cn.herodotus.engine.assistant.definition.constants.ErrorCodes;
-import cn.herodotus.engine.assistant.definition.domain.Result;
+import cn.herodotus.engine.core.definition.constant.ErrorCodes;
+import cn.herodotus.engine.core.definition.constant.HerodotusHeaders;
+import cn.herodotus.engine.core.definition.constant.SystemConstants;
+import cn.herodotus.engine.core.definition.domain.Result;
import jakarta.annotation.Resource;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -85,7 +85,7 @@ public class GlobalCertificationFilter implements GlobalFilter, Ordered {
}
// 2.外部进入的请求,如果包含 X_HERODOTUS_FROM_IN 请求头,认为是非法请求,直接拦截。X_HERODOTUS_FROM_IN 只能用于内部 Feign 间忽略权限使用
- String fromIn = exchange.getRequest().getHeaders().getFirst(HeaderUtils.X_HERODOTUS_FROM_IN);
+ String fromIn = exchange.getRequest().getHeaders().getFirst(HerodotusHeaders.X_HERODOTUS_FROM_IN);
if (ObjectUtils.isNotEmpty(fromIn)) {
log.warn("[Herodotus] |- Illegal request to disable access!");
return WebFluxUtils.writeJsonResponse(exchange.getResponse(), new Result().type(ErrorCodes.ACCESS_DENIED).status(HttpStatus.SC_FORBIDDEN));
@@ -112,6 +112,6 @@ public class GlobalCertificationFilter implements GlobalFilter, Ordered {
}
private boolean isTokenWellFormed(String token) {
- return !StringUtils.isBlank(token) && !StringUtils.containsOnly(token, BaseConstants.BEARER_TOKEN);
+ return !StringUtils.isBlank(token) && !StringUtils.containsOnly(token, SystemConstants.BEARER_TOKEN);
}
}
diff --git a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalSqlInjectionFilter.java b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalSqlInjectionFilter.java
index d2563b782f8d5325ff5acc110a253bfce4cda960..945e25529e00bd143880fa44b66f7f2393037c5f 100644
--- a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalSqlInjectionFilter.java
+++ b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/filter/GlobalSqlInjectionFilter.java
@@ -25,9 +25,9 @@
package org.dromara.dante.gateway.filter;
-import cn.herodotus.engine.assistant.core.utils.protect.SqlInjectionUtils;
-import cn.herodotus.engine.assistant.definition.constants.ErrorCodes;
-import cn.herodotus.engine.assistant.definition.domain.Result;
+import cn.herodotus.engine.core.definition.constant.ErrorCodes;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.foundation.utils.SqlInjectionUtils;
import io.netty.buffer.ByteBufAllocator;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Strings;
diff --git a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/utils/WebFluxUtils.java b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/utils/WebFluxUtils.java
index 369f6207dfaeafb5eebb267cc875e2f0b9cbb973..bbf71ef385abe727b022a5841fa806c5b5845a9b 100644
--- a/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/utils/WebFluxUtils.java
+++ b/platform/dante-cloud-gateway/src/main/java/org/dromara/dante/gateway/utils/WebFluxUtils.java
@@ -25,8 +25,8 @@
package org.dromara.dante.gateway.utils;
-import cn.herodotus.engine.assistant.core.json.jackson2.utils.Jackson2Utils;
-import cn.herodotus.engine.assistant.definition.domain.Result;
+import cn.herodotus.engine.core.definition.domain.Result;
+import cn.herodotus.engine.core.definition.utils.Jackson2Utils;
import org.apache.commons.lang3.Strings;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
diff --git a/platform/dante-cloud-message/pom.xml b/platform/dante-cloud-message/pom.xml
index 0fde7aeaa80ba01bb16d82634fd5e423b3ba1247..24006574f4849e9ae201785a9817a40b52978d79 100644
--- a/platform/dante-cloud-message/pom.xml
+++ b/platform/dante-cloud-message/pom.xml
@@ -31,7 +31,7 @@
org.dromara.dante
platform
- 3.5.5.2
+ 3.5.5.3
dante-cloud-message
@@ -39,15 +39,11 @@
org.dromara.dante
- service-spring-boot-starter
+ authorization-servlet-spring-boot-starter
cn.herodotus.engine
- message-spring-boot-starter
-
-
- cn.herodotus.engine
- supplier-sdk-message
+ servlet-message-spring-boot-starter
diff --git a/platform/dante-cloud-message/src/main/java/org/dromara/dante/message/MessageApplication.java b/platform/dante-cloud-message/src/main/java/org/dromara/dante/message/MessageApplication.java
index 938020b30035f5c95f1cd2ba7be859d3f9788f90..cc7c048b920219b4e7da405f586003835c3394d0 100644
--- a/platform/dante-cloud-message/src/main/java/org/dromara/dante/message/MessageApplication.java
+++ b/platform/dante-cloud-message/src/main/java/org/dromara/dante/message/MessageApplication.java
@@ -25,7 +25,7 @@
package org.dromara.dante.message;
-import cn.herodotus.engine.supplier.message.annotation.EnableHerodotusSupplierMessage;
+import cn.herodotus.engine.rest.servlet.message.annotation.EnableHerodotusRestServletMessage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@@ -38,7 +38,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
*/
@SpringBootApplication
@EnableDiscoveryClient
-@EnableHerodotusSupplierMessage
+@EnableHerodotusRestServletMessage
public class MessageApplication {
public static void main(String[] args) {
diff --git a/platform/dante-cloud-message/src/main/resources/application.yml b/platform/dante-cloud-message/src/main/resources/application.yml
index 2badadbad96fac3513601f58521a2d78fc39fe02..774084a9108f2f2f390620763acd03112c74fe3a 100644
--- a/platform/dante-cloud-message/src/main/resources/application.yml
+++ b/platform/dante-cloud-message/src/main/resources/application.yml
@@ -59,6 +59,7 @@ logging:
com.alibaba.nacos.common.remote.client: error
com.ulisesbocchio: error
# 开发、调试需要的日志
+ cn.herodotus: debug
org.springframework.security: info
org.springframework.web: debug
com.alicp.jetcache: debug
diff --git a/platform/dante-cloud-monitor/pom.xml b/platform/dante-cloud-monitor/pom.xml
index 52fe21dd7ac833769e698a0e160a49adabab08bb..78091ecb2583d4fb7e5fb0a6c1e91d32a585af76 100644
--- a/platform/dante-cloud-monitor/pom.xml
+++ b/platform/dante-cloud-monitor/pom.xml
@@ -30,17 +30,19 @@
platform
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
dante-cloud-monitor
- 3.5.5.2
+ 3.5.5.3
+
dante-cloud-monitor
dante-cloud-monitor
+
cn.herodotus.engine
- web-server-spring-boot-starter
+ servlet-container-spring-boot-starter
org.dromara.dante
diff --git a/platform/dante-cloud-uaa/pom.xml b/platform/dante-cloud-uaa/pom.xml
index 7ac972991ec3fd58d71292237eb120ef1bbe6466..fd87964dc876059b23c4d5bf7efe48bf3f44204d 100644
--- a/platform/dante-cloud-uaa/pom.xml
+++ b/platform/dante-cloud-uaa/pom.xml
@@ -32,7 +32,7 @@
platform
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
dante-cloud-uaa
diff --git a/platform/dante-cloud-uaa/src/main/resources/application.yml b/platform/dante-cloud-uaa/src/main/resources/application.yml
index c33b0be69737c13fffcbded0339b6da675dd1f47..8d5a9b8269b75553effa447b8265ecf372ef04a9 100644
--- a/platform/dante-cloud-uaa/src/main/resources/application.yml
+++ b/platform/dante-cloud-uaa/src/main/resources/application.yml
@@ -65,6 +65,7 @@ logging:
com.alibaba.nacos.common.remote.client: error
com.ulisesbocchio: error
# 开发、调试需要的日志
+ cn.herodotus: debug
org.springframework.security: info
org.springframework.web: info
com.alicp.jetcache: trace
diff --git a/platform/dante-cloud-upms/pom.xml b/platform/dante-cloud-upms/pom.xml
index 41821c7118ac1a72e1cf9b2f35b2893ca9a30a6f..f897f6b016f24f45f7bc732bce09e11af32b4e7f 100644
--- a/platform/dante-cloud-upms/pom.xml
+++ b/platform/dante-cloud-upms/pom.xml
@@ -30,22 +30,24 @@
platform
org.dromara.dante
- 3.5.5.2
+ 3.5.5.3
4.0.0
dante-cloud-upms
- 3.5.5.2
+ 3.5.5.3
org.dromara.dante
- service-spring-boot-starter
+ authorization-servlet-spring-boot-starter
+
org.dromara.dante
- dante-module-metadata
+ rpc-server-upms-spring-boot-starter
+
diff --git a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/UpmsApplication.java b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/UpmsApplication.java
index 2e94b14d59c9e1c3c18084ff74098c9fe5f65044..e05190720acae8003c9c92e89e307ceb5f9ecdb7 100644
--- a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/UpmsApplication.java
+++ b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/UpmsApplication.java
@@ -25,11 +25,9 @@
package org.dromara.dante.upms;
-import org.dromara.dante.upms.config.UpmsConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.context.annotation.Import;
/**
* Description: 用户中心服务
@@ -39,7 +37,6 @@ import org.springframework.context.annotation.Import;
*/
@EnableDiscoveryClient
@SpringBootApplication
-@Import(UpmsConfiguration.class)
public class UpmsApplication {
public static void main(String[] args) {
diff --git a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/config/UpmsConfiguration.java b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/config/UpmsConfiguration.java
deleted file mode 100644
index 3c4a0a60a27504bc2d7b772897410b648f5a0462..0000000000000000000000000000000000000000
--- a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/config/UpmsConfiguration.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2020-2030 码匠君
- *
- * Dante Cloud 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.
- *
- * Dante Cloud 采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1. 请不要删除和修改根目录下的LICENSE文件。
- * 2. 请不要删除和修改 Dante Cloud 源码头部的版权声明。
- * 3. 请保留源码和相关描述文件的项目出处,作者声明等。
- * 4. 分发源码时候,请注明软件出处
- * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处
- * 6. 若您的项目无法满足以上几点,可申请商业授权
- */
-
-package org.dromara.dante.upms.config;
-
-import cn.herodotus.engine.supplier.upms.logic.configuration.SupplierUpmsLogicConfiguration;
-import jakarta.annotation.PostConstruct;
-import org.dromara.dante.module.metadata.config.MetadataModuleConfiguration;
-import org.dromara.dante.module.social.config.SocialModuleConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-/**
- * Description: Upms 服务配置
- *
- * @author : gengwei.zheng
- * @date : 2021/1/19 15:24
- */
-@Configuration(proxyBeanMethods = false)
-@Import({
- SupplierUpmsLogicConfiguration.class,
- SocialModuleConfiguration.class,
- MetadataModuleConfiguration.class
-})
-public class UpmsConfiguration {
-
- private static final Logger log = LoggerFactory.getLogger(UpmsConfiguration.class);
-
- @PostConstruct
- public void postConstruct() {
- log.info("[Herodotus] |- Service [Upms Ability] Auto Configure.");
- }
-}
diff --git a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/controller/AuthorizationController.java b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/controller/AuthorizationController.java
index ebfb6be6e6794c631703603758be30c0da56619c..e09a74f1455ee867bfce9488b98fab5c20b6d5f2 100644
--- a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/controller/AuthorizationController.java
+++ b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/controller/AuthorizationController.java
@@ -25,7 +25,7 @@
package org.dromara.dante.upms.controller;
-import cn.herodotus.engine.assistant.definition.domain.Result;
+import cn.herodotus.engine.core.definition.domain.Result;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.collections4.MapUtils;
import org.dromara.dante.upms.service.AuthorizationService;
diff --git a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/service/AuthorizationService.java b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/service/AuthorizationService.java
index c8562faae3f505fd5101b6475a23434e9e53f4bc..adecb722860382b0a59da45102144a20e9f47606 100644
--- a/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/service/AuthorizationService.java
+++ b/platform/dante-cloud-upms/src/main/java/org/dromara/dante/upms/service/AuthorizationService.java
@@ -25,10 +25,10 @@
package org.dromara.dante.upms.service;
-import cn.herodotus.engine.assistant.definition.support.RestApiTemplate;
+import cn.herodotus.engine.core.definition.support.RestApiTemplate;
+import cn.hutool.v7.core.codec.binary.Base64;
import cn.zhxu.data.TypeRef;
import cn.zhxu.okhttps.OkHttps;
-import cn.hutool.v7.core.codec.binary.Base64;
import org.springframework.stereotype.Service;
import java.util.Map;
@@ -59,7 +59,7 @@ public class AuthorizationService implements RestApiTemplate {
.addUrlPara("redirect_uri", "http://192.168.101.10:8847/dante-cloud-upms/open/authorized")
.post()
.getBody()
- .toBean(new TypeRef