From d8d24d1f37172faa2bf63d1c7b5411d3df1ce0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Mon, 20 Jul 2026 23:59:25 +0800 Subject: [PATCH 01/11] =?UTF-8?q?[=E5=8D=87=E7=BA=A7]=20actions/checkout?= =?UTF-8?q?=20=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7=E8=87=B3=207.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-deploy.yml | 4 +-- .../jpa/repository/BaseJpaRepository.java | 29 ++++++++----------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 11f579a43..040346132 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -15,12 +15,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v7.0.0 + uses: actions/checkout@v7.0.1 with: ref: ${{ github.event.inputs.release_tag }} - name: Set up Apache Maven Central - uses: actions/setup-java@v5.4.0 + uses: actions/setup-java@v5.6.0 with: distribution: 'liberica' java-version: '25' diff --git a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/repository/BaseJpaRepository.java b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/repository/BaseJpaRepository.java index 85ebeafc2..2bbe3a8d8 100644 --- a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/repository/BaseJpaRepository.java +++ b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/repository/BaseJpaRepository.java @@ -36,7 +36,6 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.QueryHints; import org.springframework.data.repository.NoRepositoryBean; -import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.List; @@ -51,55 +50,51 @@ import java.util.Optional; @NoRepositoryBean public interface BaseJpaRepository extends JpaRepository, JpaSpecificationExecutor { - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) List findAll(); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) List findAll(Sort sort); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) Page findAll(Pageable pageable); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) List findAll(Specification specification); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) List findAll(Specification specification, Sort sort); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) Page findAll(Specification specification, Pageable pageable); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) Optional findById(ID id); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) Optional findOne(Specification specification); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) List findAllById(Iterable ids); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) long count(Specification specification); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) long count(); - @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) @Override + @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) E getReferenceById(ID id); - - @Transactional - @Override - void deleteById(ID id); } -- Gitee From f45f0fd5d490d572d7166f24001e5d6de5fab283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 22 Jul 2026 17:26:31 +0800 Subject: [PATCH 02/11] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E5=B1=82=E6=8A=BD=E8=B1=A1=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E7=BB=9F=E4=B8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20LocaDateTime=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dante/data/commons/entity/AbstractEntity.java | 13 +++++++------ .../dante/data/jpa/entity/AbstractEntity.java | 14 +++++++------- .../upms/service/security/SysAttributeService.java | 3 ++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dante-data/dante-data-commons/src/main/java/cn/herodotus/dante/data/commons/entity/AbstractEntity.java b/dante-data/dante-data-commons/src/main/java/cn/herodotus/dante/data/commons/entity/AbstractEntity.java index 517ac02e9..58823098f 100644 --- a/dante-data/dante-data-commons/src/main/java/cn/herodotus/dante/data/commons/entity/AbstractEntity.java +++ b/dante-data/dante-data-commons/src/main/java/cn/herodotus/dante/data/commons/entity/AbstractEntity.java @@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.google.common.base.MoreObjects; import io.swagger.v3.oas.annotations.media.Schema; +import java.time.LocalDateTime; import java.util.Date; /** @@ -48,25 +49,25 @@ public abstract class AbstractEntity implements BaseEntity { @Schema(name = "数据创建时间", title = "数据库审计通用字段", description = "该字段仅用于数据显示,具体的数据设置由各自 Spring Data Module 负责设置") @JsonFormat(pattern = SystemConstants.PATTERN__DATE_TIME) - private Date createTime = new Date(); + private LocalDateTime createTime = LocalDateTime.now(); @Schema(name = "数据更新时间", title = "数据库审计通用字段", description = "该字段仅用于数据显示,具体的数据设置由各自 Spring Data Module 负责设置") @JsonFormat(pattern = SystemConstants.PATTERN__DATE_TIME) - private Date updateTime = new Date(); + private LocalDateTime updateTime = LocalDateTime.now(); - public Date getCreateTime() { + public LocalDateTime getCreateTime() { return createTime; } - public void setCreateTime(Date createTime) { + public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; } - public Date getUpdateTime() { + public LocalDateTime getUpdateTime() { return updateTime; } - public void setUpdateTime(Date updateTime) { + public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; } diff --git a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/entity/AbstractEntity.java b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/entity/AbstractEntity.java index ed9494ad1..1e929e669 100644 --- a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/entity/AbstractEntity.java +++ b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/entity/AbstractEntity.java @@ -36,7 +36,7 @@ import jakarta.persistence.MappedSuperclass; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; -import java.util.Date; +import java.time.LocalDateTime; /** *

Description: 通用的基础实体定义

@@ -53,27 +53,27 @@ public abstract class AbstractEntity implements BaseEntity { @Column(name = "create_time", updatable = false) @CreatedDate @JsonFormat(pattern = SystemConstants.PATTERN__DATE_TIME) - private Date createTime = new Date(); + private LocalDateTime createTime = LocalDateTime.now(); @Schema(name = "数据更新时间", title = "数据库审计通用字段", description = "由 JPA 自动填充无需手动设置") @Column(name = "update_time") @LastModifiedDate @JsonFormat(pattern = SystemConstants.PATTERN__DATE_TIME) - private Date updateTime = new Date(); + private LocalDateTime updateTime = LocalDateTime.now(); - public Date getCreateTime() { + public LocalDateTime getCreateTime() { return createTime; } - public void setCreateTime(Date createTime) { + public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; } - public Date getUpdateTime() { + public LocalDateTime getUpdateTime() { return updateTime; } - public void setUpdateTime(Date updateTime) { + public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; } diff --git a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java index 2e7203eaf..0ca069e1b 100644 --- a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java +++ b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java @@ -32,6 +32,7 @@ import cn.herodotus.dante.logic.upms.entity.security.SysPermission; import cn.herodotus.dante.logic.upms.repository.security.SysAttributeRepository; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; import java.util.*; /** @@ -69,7 +70,7 @@ public class SysAttributeService extends AbstractJpaService Date: Wed, 22 Jul 2026 17:28:12 +0800 Subject: [PATCH 03/11] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E5=B1=82=E6=8A=BD=E8=B1=A1=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E7=BB=9F=E4=B8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20LocaDateTime=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dante/logic/message/entity/PullStamp.java | 8 ++++---- .../commons/definition/AbstractAuditRecord.java | 14 +++++++------- .../persistence/commons/domain/IpProtection.java | 13 +++++++------ 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/entity/PullStamp.java b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/entity/PullStamp.java index 27c02a38d..a6ab40bd7 100644 --- a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/entity/PullStamp.java +++ b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/entity/PullStamp.java @@ -35,7 +35,7 @@ import jakarta.persistence.*; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.UuidGenerator; -import java.util.Date; +import java.time.LocalDateTime; /** *

Description: 信息拉取标记

@@ -69,7 +69,7 @@ public class PullStamp implements BaseEntity { @Schema(name = "上次拉取时间") @Column(name = "latest_pull_time", updatable = false) @JsonFormat(pattern = SystemConstants.PATTERN__DATE_TIME) - private Date latestPullTime = new Date(); + private LocalDateTime latestPullTime = LocalDateTime.now(); public String getStampId() { return stampId; @@ -95,11 +95,11 @@ public class PullStamp implements BaseEntity { this.source = source; } - public Date getLatestPullTime() { + public LocalDateTime getLatestPullTime() { return latestPullTime; } - public void setLatestPullTime(Date latestPullTime) { + public void setLatestPullTime(LocalDateTime latestPullTime) { this.latestPullTime = latestPullTime; } diff --git a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/definition/AbstractAuditRecord.java b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/definition/AbstractAuditRecord.java index ea7f83727..1c38f5701 100644 --- a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/definition/AbstractAuditRecord.java +++ b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/definition/AbstractAuditRecord.java @@ -31,7 +31,7 @@ import cn.hutool.v7.http.useragent.UserAgentUtil; import com.google.common.base.MoreObjects; import org.apache.commons.lang3.ObjectUtils; -import java.util.Date; +import java.time.LocalDateTime; /** *

Description: 审计记录抽象定义

@@ -65,9 +65,9 @@ public abstract class AbstractAuditRecord implements BaseModel { private String browserEngineVersion; - private Date createTime = new Date(); + private LocalDateTime createTime = LocalDateTime.now(); - private Date updateTime = new Date(); + private LocalDateTime updateTime = LocalDateTime.now(); protected AbstractAuditRecord() { } @@ -172,19 +172,19 @@ public abstract class AbstractAuditRecord implements BaseModel { this.browserEngineVersion = browserEngineVersion; } - public Date getCreateTime() { + public LocalDateTime getCreateTime() { return createTime; } - public void setCreateTime(Date createTime) { + public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; } - public Date getUpdateTime() { + public LocalDateTime getUpdateTime() { return updateTime; } - public void setUpdateTime(Date updateTime) { + public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; } diff --git a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/domain/IpProtection.java b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/domain/IpProtection.java index 20f57a75c..70a85b49b 100644 --- a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/domain/IpProtection.java +++ b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/domain/IpProtection.java @@ -28,6 +28,7 @@ package cn.herodotus.dante.persistence.commons.domain; import cn.herodotus.dante.core.domain.BaseModel; import com.google.common.base.MoreObjects; +import java.time.LocalDateTime; import java.util.Date; /** @@ -57,7 +58,7 @@ public class IpProtection implements BaseModel { /** * 上次登录时间 */ - private Date lastSignInTime; + private LocalDateTime lastSignInTime; /** * 本次登录IP地址 */ @@ -69,7 +70,7 @@ public class IpProtection implements BaseModel { /** * 本次登录时间 */ - private Date currentSignInTime; + private LocalDateTime currentSignInTime; /** * 是否为常规登录地址 */ @@ -99,11 +100,11 @@ public class IpProtection implements BaseModel { this.currentLocation = currentLocation; } - public Date getCurrentSignInTime() { + public LocalDateTime getCurrentSignInTime() { return currentSignInTime; } - public void setCurrentSignInTime(Date currentSignInTime) { + public void setCurrentSignInTime(LocalDateTime currentSignInTime) { this.currentSignInTime = currentSignInTime; } @@ -123,11 +124,11 @@ public class IpProtection implements BaseModel { this.lastLocation = lastLocation; } - public Date getLastSignInTime() { + public LocalDateTime getLastSignInTime() { return lastSignInTime; } - public void setLastSignInTime(Date lastSignInTime) { + public void setLastSignInTime(LocalDateTime lastSignInTime) { this.lastSignInTime = lastSignInTime; } -- Gitee From a06ec15db5ccf96a3c0462fe816e4c25a069fc4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 25 Jul 2026 15:56:48 +0800 Subject: [PATCH 04/11] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20p6spy=20=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=20unikue=20p6spy=20=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20jdk=2017?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dante-framework/dante-hibernate/pom.xml | 2 +- .../dante/hibernate/p6spy/P6SpyMessageFormatting.java | 9 +-------- .../logic/message/repository/AnnouncementRepository.java | 4 ++-- .../dante/logic/message/service/AnnouncementService.java | 4 ++-- .../dante/logic/message/service/PullStampService.java | 4 ++-- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dante-framework/dante-hibernate/pom.xml b/dante-framework/dante-hibernate/pom.xml index 38415feae..38e585d0c 100644 --- a/dante-framework/dante-hibernate/pom.xml +++ b/dante-framework/dante-hibernate/pom.xml @@ -46,7 +46,7 @@ - p6spy + cn.unikue.forkextension.p6spy p6spy diff --git a/dante-framework/dante-hibernate/src/main/java/cn/herodotus/dante/hibernate/p6spy/P6SpyMessageFormatting.java b/dante-framework/dante-hibernate/src/main/java/cn/herodotus/dante/hibernate/p6spy/P6SpyMessageFormatting.java index 7a962ca84..87e5737cc 100644 --- a/dante-framework/dante-hibernate/src/main/java/cn/herodotus/dante/hibernate/p6spy/P6SpyMessageFormatting.java +++ b/dante-framework/dante-hibernate/src/main/java/cn/herodotus/dante/hibernate/p6spy/P6SpyMessageFormatting.java @@ -45,13 +45,6 @@ public class P6SpyMessageFormatting implements MessageFormattingStrategy { @Override public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) { - /** - * - * StringBuilder 是为了避免字符串拼接过程中产生很多不必要的字符串对象。 - * 经过编译器优化,多个字符串相‘+’,优化后,与StringBuilder等价 - * - * 关注idea的“'StringBuilder builder' can be replaced with 'String'”提示 - */ String builder = this.format.format(new Date()) + " | took " + elapsed + "ms | " + @@ -63,6 +56,6 @@ public class P6SpyMessageFormatting implements MessageFormattingStrategy { "\n------------------------| " + sql + ";"; - return StringUtils.isNotEmpty(sql.trim()) ? String.valueOf(builder) : ""; + return StringUtils.isNotEmpty(sql.trim()) ? builder : ""; } } diff --git a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/repository/AnnouncementRepository.java b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/repository/AnnouncementRepository.java index 00ea4d729..10304a7c8 100644 --- a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/repository/AnnouncementRepository.java +++ b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/repository/AnnouncementRepository.java @@ -31,7 +31,7 @@ import jakarta.persistence.QueryHint; import org.hibernate.jpa.AvailableHints; import org.springframework.data.jpa.repository.QueryHints; -import java.util.Date; +import java.time.LocalDateTime; import java.util.List; /** @@ -43,5 +43,5 @@ import java.util.List; public interface AnnouncementRepository extends BaseJpaRepository { @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) - List findAllByCreateTimeAfter(Date stamp); + List findAllByCreateTimeAfter(LocalDateTime stamp); } diff --git a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/AnnouncementService.java b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/AnnouncementService.java index 899aac965..9d5376baf 100644 --- a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/AnnouncementService.java +++ b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/AnnouncementService.java @@ -31,7 +31,7 @@ import cn.herodotus.dante.logic.message.entity.Announcement; import cn.herodotus.dante.logic.message.repository.AnnouncementRepository; import org.springframework.stereotype.Service; -import java.util.Date; +import java.time.LocalDateTime; import java.util.List; /** @@ -54,7 +54,7 @@ public class AnnouncementService extends AbstractJpaService pullAnnouncements(Date stamp) { + public List pullAnnouncements(LocalDateTime stamp) { return announcementRepository.findAllByCreateTimeAfter(stamp); } } diff --git a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/PullStampService.java b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/PullStampService.java index b24609664..25d6803b1 100644 --- a/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/PullStampService.java +++ b/dante-logic/dante-logic-message/src/main/java/cn/herodotus/dante/logic/message/service/PullStampService.java @@ -32,7 +32,7 @@ import cn.herodotus.dante.logic.message.repository.PullStampRepository; import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; -import java.util.Date; +import java.time.LocalDateTime; /** *

Description: MessagePullStampService

@@ -65,7 +65,7 @@ public class PullStampService extends AbstractJpaService { stamp = new PullStamp(); stamp.setUserId(userId); } - stamp.setLatestPullTime(new Date()); + stamp.setLatestPullTime(LocalDateTime.now()); return this.save(stamp); } -- Gitee From fa9bcf18236fe9735570d599c5baed335d2d5c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 31 Jul 2026 16:21:09 +0800 Subject: [PATCH 05/11] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E6=96=B0=E5=A2=9E=E6=8C=89?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E9=BB=98=E8=AE=A4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/jpa/service/AbstractJpaService.java | 28 +++++++++++++++++++ .../jpa/service/BaseJpaReadableService.java | 14 ++++++---- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/AbstractJpaService.java b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/AbstractJpaService.java index eaf446773..c4a0b17bf 100644 --- a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/AbstractJpaService.java +++ b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/AbstractJpaService.java @@ -27,6 +27,13 @@ package cn.herodotus.dante.data.jpa.service; import cn.herodotus.dante.core.constant.SymbolConstants; import cn.herodotus.dante.core.domain.BaseEntity; +import cn.herodotus.dante.data.jpa.entity.AbstractEntity; +import com.google.common.reflect.TypeToken; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.domain.Specification; import java.io.Serializable; @@ -41,4 +48,25 @@ public abstract class AbstractJpaService findByCondition(Specification specification, int pageNumber, int pageSize) { + + Pageable pageable = PageRequest.of(pageNumber, pageSize); + + TypeToken typeToken = new TypeToken<>(getClass()) { + }; + if (typeToken.isSubtypeOf(AbstractEntity.class)) { + pageable = PageRequest.of(pageNumber, pageSize, Sort.by(Sort.Direction.DESC, "updateTime")); + } + + return findByPage(specification, pageable); + } } diff --git a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/BaseJpaReadableService.java b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/BaseJpaReadableService.java index 9be4b8d6b..d087f1629 100644 --- a/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/BaseJpaReadableService.java +++ b/dante-data/dante-data-jpa/src/main/java/cn/herodotus/dante/data/jpa/service/BaseJpaReadableService.java @@ -187,19 +187,21 @@ public interface BaseJpaReadableService findByPage(Specification specification, int pageNumber, int pageSize) { - return getRepository().findAll(specification, PageRequest.of(pageNumber, pageSize)); + return findByPage(specification, PageRequest.of(pageNumber, pageSize)); } /** * 查询分页数据 * - * @param pageNumber 当前页码, 起始页码 0 - * @param pageSize 每页显示的数据条数 - * @param direction {@link Sort.Direction} + * @param specification {@link Specification} + * @param pageNumber 当前页码, 起始页码 0 + * @param pageSize 每页显示的数据条数 + * @param direction 排序方向 {@link Sort.Direction} + * @param properties 需要排序的字段 * @return 分页数据 */ - default Page findByPage(int pageNumber, int pageSize, Sort.Direction direction) { - return findByPage(PageRequest.of(pageNumber, pageSize, direction)); + default Page findByPage(Specification specification, int pageNumber, int pageSize, Sort.Direction direction, String... properties) { + return findByPage(specification, PageRequest.of(pageNumber, pageSize, direction, properties)); } /** -- Gitee From 2dc0aa777bd8c4ea373c07cf458bca8fe3be8117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Mon, 10 Aug 2026 17:46:58 +0800 Subject: [PATCH 06/11] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84=E4=BB=A5=E5=8F=8A=E6=94=BE?= =?UTF-8?q?=E7=BD=AE=E6=A8=A1=E5=9D=97=EF=BC=8C=E6=8F=90=E5=8D=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BB=A3=E7=A0=81=E5=86=85=E8=81=9A=E6=80=A7=E9=99=8D?= =?UTF-8?q?=E4=BD=8E=E8=80=A6=E5=90=88=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dante/spring}/event/AbstractApplicationEvent.java | 2 +- .../dante/spring}/event/ApplicationStrategyEventManager.java | 2 +- .../cn/herodotus/dante/spring}/event/StrategyEventManager.java | 2 +- .../dante/logic/upms/domain/event/SysAttributeChangeEvent.java | 2 +- .../dante/message/commons/constant/MessageConstants.java | 2 ++ .../definition/strategy/EnumDictionaryCollectEventManager.java | 2 +- .../definition/strategy/MessageSendingEventManager.java | 2 +- .../definition/strategy/RestMappingCollectEventManager.java | 2 +- .../message/commons/event/DialogueMessageReceivingEvent.java | 2 +- .../message/commons/event/EnumDictionaryCollectEvent.java | 2 +- .../dante/message/commons/event/MqttMessageReceivingEvent.java | 2 +- .../dante/message/commons/event/MqttMessageSendingEvent.java | 3 +-- .../dante/message/commons/event/RestMappingCollectEvent.java | 2 +- .../dante/message/commons/event/StreamMessageSendingEvent.java | 2 +- .../commons/event/WebSocketBroadcastMessageSendingEvent.java | 2 +- .../commons/event/WebSocketUserMessageSendingEvent.java | 2 +- .../definition/event/AbstractSystemTopicApplicationEvent.java | 2 +- .../emqx/definition/event/AbstractWebhookApplicationEvent.java | 2 +- .../processor/SecurityAttributeDistributionProcessor.java | 2 +- .../dante/oauth2/commons/event/AccountStatusChangeEvent.java | 2 +- .../dante/oauth2/commons/event/DisableAuthenticationEvent.java | 2 +- .../dante/oauth2/commons/event/EnableAuthenticationEvent.java | 2 +- .../dante/oauth2/commons/event/MessageSendingEvent.java | 2 +- .../commons/event/OAuth2ClientRegistrationSuccessEvent.java | 2 +- .../commons/event/OAuth2DeviceVerificationSuccessEvent.java | 2 +- .../commons/strategy/AccountStatusChangedEventManager.java | 2 +- .../commons/strategy/DisableAuthenticationEventManager.java | 2 +- .../commons/strategy/EnableAuthenticationEventManager.java | 2 +- .../strategy/OAuth2ClientRegistrationSuccessEventManager.java | 2 +- .../strategy/OAuth2DeviceVerificationSuccessEventManager.java | 2 +- .../persistence/commons/event/SignOutComplianceEvent.java | 2 +- 31 files changed, 32 insertions(+), 31 deletions(-) rename {dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition => dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring}/event/AbstractApplicationEvent.java (96%) rename {dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition => dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring}/event/ApplicationStrategyEventManager.java (96%) rename {dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition => dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring}/event/StrategyEventManager.java (98%) diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/AbstractApplicationEvent.java b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/AbstractApplicationEvent.java similarity index 96% rename from dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/AbstractApplicationEvent.java rename to dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/AbstractApplicationEvent.java index 789c32dd5..3d27eda44 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/AbstractApplicationEvent.java +++ b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/AbstractApplicationEvent.java @@ -23,7 +23,7 @@ * 6. 若您的项目无法满足以上几点,可申请商业授权 */ -package cn.herodotus.dante.message.commons.definition.event; +package cn.herodotus.dante.spring.event; import org.springframework.context.ApplicationEvent; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/ApplicationStrategyEventManager.java b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/ApplicationStrategyEventManager.java similarity index 96% rename from dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/ApplicationStrategyEventManager.java rename to dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/ApplicationStrategyEventManager.java index 37d953ae9..3dd4f8886 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/ApplicationStrategyEventManager.java +++ b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/ApplicationStrategyEventManager.java @@ -23,7 +23,7 @@ * 6. 若您的项目无法满足以上几点,可申请商业授权 */ -package cn.herodotus.dante.message.commons.definition.event; +package cn.herodotus.dante.spring.event; /** *

Description: 应用策略事件

diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/StrategyEventManager.java b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/StrategyEventManager.java similarity index 98% rename from dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/StrategyEventManager.java rename to dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/StrategyEventManager.java index 078d6a8a1..9c01246cc 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/event/StrategyEventManager.java +++ b/dante-framework/dante-spring/src/main/java/cn/herodotus/dante/spring/event/StrategyEventManager.java @@ -23,7 +23,7 @@ * 6. 若您的项目无法满足以上几点,可申请商业授权 */ -package cn.herodotus.dante.message.commons.definition.event; +package cn.herodotus.dante.spring.event; import cn.herodotus.dante.core.jackson.JacksonUtils; import cn.herodotus.dante.spring.context.ServiceContextHolder; diff --git a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/domain/event/SysAttributeChangeEvent.java b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/domain/event/SysAttributeChangeEvent.java index f32d7c949..d0c8d8c10 100644 --- a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/domain/event/SysAttributeChangeEvent.java +++ b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/domain/event/SysAttributeChangeEvent.java @@ -26,7 +26,7 @@ package cn.herodotus.dante.logic.upms.domain.event; import cn.herodotus.dante.logic.upms.entity.security.SysAttribute; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import java.time.Clock; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/constant/MessageConstants.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/constant/MessageConstants.java index 9e2f70896..dd166846e 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/constant/MessageConstants.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/constant/MessageConstants.java @@ -67,6 +67,8 @@ public interface MessageConstants extends BaseConstants { String WEBSOCKET_DESTINATION_BROADCAST_NOTICE = STOMP_CHANNEL_BROADCAST + "/notice"; String WEBSOCKET_DESTINATION_BROADCAST_ONLINE = STOMP_CHANNEL_BROADCAST + "/online"; String WEBSOCKET_DESTINATION_PERSONAL_MESSAGE = STOMP_CHANNEL_PERSONAL + "/message"; + String WEBSOCKET_DESTINATION_PERSONAL_NOTIFY = STOMP_CHANNEL_PERSONAL + "/notify"; + String CACHE_NAME_EMAIL_VERIFICATION_CODE = CACHE_TOKEN_BASE_PREFIX + "email_verification:"; } diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/EnumDictionaryCollectEventManager.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/EnumDictionaryCollectEventManager.java index 01cdc4973..e7fb540fb 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/EnumDictionaryCollectEventManager.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/EnumDictionaryCollectEventManager.java @@ -26,7 +26,7 @@ package cn.herodotus.dante.message.commons.definition.strategy; import cn.herodotus.dante.core.domain.Dictionary; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import java.util.List; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/MessageSendingEventManager.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/MessageSendingEventManager.java index af2d62996..eb87ecdcb 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/MessageSendingEventManager.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/MessageSendingEventManager.java @@ -27,7 +27,7 @@ package cn.herodotus.dante.message.commons.definition.strategy; import cn.herodotus.dante.message.commons.definition.Message; import cn.herodotus.dante.message.commons.definition.enums.MessageCategory; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.message.commons.domain.BroadcastMessage; import cn.herodotus.dante.message.commons.domain.MqttMessage; import cn.herodotus.dante.message.commons.domain.UserMessage; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/RestMappingCollectEventManager.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/RestMappingCollectEventManager.java index dea779045..734a120f7 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/RestMappingCollectEventManager.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/definition/strategy/RestMappingCollectEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.definition.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.security.domain.attribute.RestMapping; import cn.herodotus.dante.spring.context.ServiceContextHolder; import org.apache.commons.collections4.MapUtils; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/DialogueMessageReceivingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/DialogueMessageReceivingEvent.java index 0fc8b3e3d..800b561c2 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/DialogueMessageReceivingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/DialogueMessageReceivingEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.DialogueMessage; import java.time.Clock; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/EnumDictionaryCollectEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/EnumDictionaryCollectEvent.java index c2c06d198..cdcce953f 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/EnumDictionaryCollectEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/EnumDictionaryCollectEvent.java @@ -26,7 +26,7 @@ package cn.herodotus.dante.message.commons.event; import cn.herodotus.dante.core.domain.Dictionary; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import java.util.List; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageReceivingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageReceivingEvent.java index 24f2848d6..1147b1f90 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageReceivingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageReceivingEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import org.springframework.messaging.Message; /** diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageSendingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageSendingEvent.java index 62a506b48..721330e2e 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageSendingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/MqttMessageSendingEvent.java @@ -25,10 +25,9 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.MqttMessage; import cn.hutool.v7.core.util.ByteUtil; -import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import java.nio.charset.StandardCharsets; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/RestMappingCollectEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/RestMappingCollectEvent.java index 4bacfe44e..0fe48ee42 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/RestMappingCollectEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/RestMappingCollectEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.security.domain.attribute.RestMapping; import java.time.Clock; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/StreamMessageSendingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/StreamMessageSendingEvent.java index 92c2efb49..bec8a70c2 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/StreamMessageSendingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/StreamMessageSendingEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.StreamMessage; import java.time.Clock; diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketBroadcastMessageSendingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketBroadcastMessageSendingEvent.java index f4e0bf758..bfaf4a216 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketBroadcastMessageSendingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketBroadcastMessageSendingEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.BroadcastMessage; /** diff --git a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketUserMessageSendingEvent.java b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketUserMessageSendingEvent.java index 53b0e5cf4..4fbae6e87 100644 --- a/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketUserMessageSendingEvent.java +++ b/dante-message/dante-message-commons/src/main/java/cn/herodotus/dante/message/commons/event/WebSocketUserMessageSendingEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.UserMessage; /** diff --git a/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractSystemTopicApplicationEvent.java b/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractSystemTopicApplicationEvent.java index 49f610365..2b50078a2 100644 --- a/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractSystemTopicApplicationEvent.java +++ b/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractSystemTopicApplicationEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.emqx.definition.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.emqx.definition.domain.AbstractSystemTopic; import java.time.Clock; diff --git a/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractWebhookApplicationEvent.java b/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractWebhookApplicationEvent.java index 249ba6c04..65cdd488b 100644 --- a/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractWebhookApplicationEvent.java +++ b/dante-message/dante-message-emqx/src/main/java/cn/herodotus/dante/message/emqx/definition/event/AbstractWebhookApplicationEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.message.emqx.definition.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.emqx.definition.domain.AbstractWebhook; import java.time.Clock; diff --git a/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/processor/SecurityAttributeDistributionProcessor.java b/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/processor/SecurityAttributeDistributionProcessor.java index 7f1672c00..e43d28c1e 100644 --- a/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/processor/SecurityAttributeDistributionProcessor.java +++ b/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/processor/SecurityAttributeDistributionProcessor.java @@ -31,7 +31,7 @@ import cn.herodotus.dante.logic.upms.entity.security.SysAttribute; import cn.herodotus.dante.logic.upms.entity.security.SysInterface; import cn.herodotus.dante.logic.upms.service.security.SysAttributeService; import cn.herodotus.dante.logic.upms.service.security.SysInterfaceService; -import cn.herodotus.dante.message.commons.definition.event.StrategyEventManager; +import cn.herodotus.dante.spring.event.StrategyEventManager; import cn.herodotus.dante.message.commons.event.ApplicationReadinessEvent; import cn.herodotus.dante.oauth2.authorization.attribute.SecurityAttributeAnalyzer; import cn.herodotus.dante.oauth2.authorization.autoconfigure.bus.RemoteAttributeDistributionEvent; diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/AccountStatusChangeEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/AccountStatusChangeEvent.java index 142f2843d..0b186ab4d 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/AccountStatusChangeEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/AccountStatusChangeEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.message.commons.domain.AccountStatus; import java.time.Clock; diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/DisableAuthenticationEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/DisableAuthenticationEvent.java index 69ad49429..33f810527 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/DisableAuthenticationEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/DisableAuthenticationEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; /** *

Description: 关闭认证事件

diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/EnableAuthenticationEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/EnableAuthenticationEvent.java index 639691c88..c6e02ea99 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/EnableAuthenticationEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/EnableAuthenticationEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.security.domain.RegisteredClientTransmitter; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/MessageSendingEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/MessageSendingEvent.java index 739a59614..4600afa4e 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/MessageSendingEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/MessageSendingEvent.java @@ -26,7 +26,7 @@ package cn.herodotus.dante.oauth2.commons.event; import cn.herodotus.dante.message.commons.definition.Message; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; /** *

Description: 本地发送统一消息事件

diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2ClientRegistrationSuccessEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2ClientRegistrationSuccessEvent.java index e7d52fc05..108c2317a 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2ClientRegistrationSuccessEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2ClientRegistrationSuccessEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.security.domain.RegisteredClientTransmitter; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2DeviceVerificationSuccessEvent.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2DeviceVerificationSuccessEvent.java index 11ab66eb9..87250f13d 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2DeviceVerificationSuccessEvent.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/event/OAuth2DeviceVerificationSuccessEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import cn.herodotus.dante.security.domain.DeviceVerificationTransmitter; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/AccountStatusChangedEventManager.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/AccountStatusChangedEventManager.java index 25bebc79f..5f4b3161c 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/AccountStatusChangedEventManager.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/AccountStatusChangedEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.message.commons.domain.AccountStatus; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/DisableAuthenticationEventManager.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/DisableAuthenticationEventManager.java index c2c2c8ab7..14813c30a 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/DisableAuthenticationEventManager.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/DisableAuthenticationEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; /** *

Description: 开启认证事件管理器

diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/EnableAuthenticationEventManager.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/EnableAuthenticationEventManager.java index c0c8ca4c0..0a06447fc 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/EnableAuthenticationEventManager.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/EnableAuthenticationEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.security.domain.RegisteredClientTransmitter; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2ClientRegistrationSuccessEventManager.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2ClientRegistrationSuccessEventManager.java index 49126b25b..e2ee2d820 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2ClientRegistrationSuccessEventManager.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2ClientRegistrationSuccessEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.security.domain.RegisteredClientTransmitter; /** diff --git a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2DeviceVerificationSuccessEventManager.java b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2DeviceVerificationSuccessEventManager.java index 415336aaf..1e4bfe0c1 100644 --- a/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2DeviceVerificationSuccessEventManager.java +++ b/dante-oauth2/dante-oauth2-commons/src/main/java/cn/herodotus/dante/oauth2/commons/strategy/OAuth2DeviceVerificationSuccessEventManager.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.oauth2.commons.strategy; -import cn.herodotus.dante.message.commons.definition.event.ApplicationStrategyEventManager; +import cn.herodotus.dante.spring.event.ApplicationStrategyEventManager; import cn.herodotus.dante.security.domain.DeviceVerificationTransmitter; /** diff --git a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/event/SignOutComplianceEvent.java b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/event/SignOutComplianceEvent.java index 537edb7b3..82c8873f9 100644 --- a/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/event/SignOutComplianceEvent.java +++ b/dante-persistence/dante-persistence-commons/src/main/java/cn/herodotus/dante/persistence/commons/event/SignOutComplianceEvent.java @@ -25,7 +25,7 @@ package cn.herodotus.dante.persistence.commons.event; -import cn.herodotus.dante.message.commons.definition.event.AbstractApplicationEvent; +import cn.herodotus.dante.spring.event.AbstractApplicationEvent; import jakarta.servlet.http.HttpServletRequest; import org.springframework.security.oauth2.server.authorization.OAuth2Authorization; -- Gitee From d8a3eff463b51277f3b2c14f37961644b240a1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Mon, 10 Aug 2026 22:36:42 +0800 Subject: [PATCH 07/11] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20SysUser=20?= =?UTF-8?q?=E5=92=8C=20SysEmployee=20=E5=AE=9E=E4=BE=8B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20@JsonManagedReference=20=E5=92=8C=20@JsonB?= =?UTF-8?q?ackReference=20=E6=B3=A8=E8=A7=A3=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=8F=8C=E5=90=91=E5=85=B3=E8=81=94=E5=90=8E=20Jackson=20?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=87=BA=E7=8E=B0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/herodotus/dante/logic/upms/entity/hr/SysEmployee.java | 4 +++- .../herodotus/dante/logic/upms/entity/security/SysUser.java | 4 +++- .../logic/upms/service/security/SysAttributeService.java | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/hr/SysEmployee.java b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/hr/SysEmployee.java index e9e115daa..54ca94063 100644 --- a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/hr/SysEmployee.java +++ b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/hr/SysEmployee.java @@ -33,6 +33,7 @@ import cn.herodotus.dante.logic.upms.entity.security.SysUser; import cn.herodotus.dante.logic.upms.enums.Gender; import cn.herodotus.dante.logic.upms.enums.Identity; import cn.herodotus.dante.security.enums.AccountCategory; +import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.google.common.base.MoreObjects; @@ -147,8 +148,9 @@ public class SysEmployee extends AbstractSysEntity implements SocialUserDetails private Set departments = new HashSet<>(); @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = LogicUpmsConstants.REGION_SYS_USER) - @JsonDeserialize(using = SysUserEmptyToNull.class) @OneToOne(mappedBy = "employee", cascade = CascadeType.ALL) + @JsonDeserialize(using = SysUserEmptyToNull.class) + @JsonBackReference private SysUser user; public SysUser getUser() { diff --git a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/security/SysUser.java b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/security/SysUser.java index 9562f600a..3373a0fb8 100644 --- a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/security/SysUser.java +++ b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/entity/security/SysUser.java @@ -38,6 +38,7 @@ import cn.herodotus.dante.logic.upms.constant.LogicUpmsConstants; import cn.herodotus.dante.logic.upms.domain.deserializer.SysEmployeeEmptyToNull; import cn.herodotus.dante.logic.upms.entity.hr.SysEmployee; import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.JsonManagedReference; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.google.common.base.MoreObjects; import io.swagger.v3.oas.annotations.media.Schema; @@ -136,7 +137,6 @@ public class SysUser extends AbstractSysEntity { *

* 因为 @ManyToMany 使用的是集合,空对象不会被转成对象Set进去。 */ - @JsonDeserialize(using = SysEmployeeEmptyToNull.class) @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = LogicUpmsConstants.REGION_SYS_EMPLOYEE) @Schema(name = "人员") @OneToOne(fetch = FetchType.LAZY) @@ -145,6 +145,8 @@ public class SysUser extends AbstractSysEntity { inverseJoinColumns = {@JoinColumn(name = "employee_id")}, uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "employee_id"})}, indexes = {@Index(name = "sys_user_employee_sid_idx", columnList = "user_id"), @Index(name = "sys_user_employee_eid_idx", columnList = "employee_id")}) + @JsonManagedReference + @JsonDeserialize(using = SysEmployeeEmptyToNull.class) private SysEmployee employee; public String getPhoneNumber() { diff --git a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java index 0ca069e1b..2a4a55117 100644 --- a/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java +++ b/dante-logic/dante-logic-upms/src/main/java/cn/herodotus/dante/logic/upms/service/security/SysAttributeService.java @@ -33,7 +33,10 @@ import cn.herodotus.dante.logic.upms.repository.security.SysAttributeRepository; import org.springframework.stereotype.Service; import java.time.LocalDateTime; -import java.util.*; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; /** *

Description: SysAttributeService

-- Gitee From 8f3c30b0064a197914ba188809c2361e695dba4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 14 Aug 2026 17:29:26 +0800 Subject: [PATCH 08/11] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=B8=B8=E7=94=A8=E5=B8=B8=E9=87=8F=E5=80=BC?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=90=88=E5=B9=B6=E9=83=A8=E5=88=86=E7=89=A9?= =?UTF-8?q?=E8=81=94=E7=BD=91=E5=BA=94=E7=94=A8=E5=B8=B8=E9=87=8F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dante/core/constant/SystemConstants.java | 42 ++++++++++++++++--- .../herodotus/dante/core/domain/Result.java | 4 +- .../controller/OpenDeviceController.java | 2 +- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/constant/SystemConstants.java b/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/constant/SystemConstants.java index 4a6677637..876fd7203 100644 --- a/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/constant/SystemConstants.java +++ b/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/constant/SystemConstants.java @@ -40,6 +40,10 @@ public interface SystemConstants { * 默认租户ID */ String TENANT_ID = "public"; + /** + * 默认的 API 版本 + */ + String API_VERSION = "v1"; /** * 默认树形结构根节点 */ @@ -58,16 +62,31 @@ public interface SystemConstants { */ String DATA_TYPE__STRING = "STRING"; String DATA_TYPE__NUMBER = "NUMBER"; + /** + * gRPC 服务发现协议 + */ + String GRPC__DISCOVERY_SCHEMA = "discovery"; + String GRPC__DISCOVERY_PROTOCOL = GRPC__DISCOVERY_SCHEMA + ":///"; + /** + * 常用状态值 + */ + String STATUS__SUCCESS = "success"; + String STATUS__FAILURE = "failure"; + String STATUS__ERROR = "error"; /* ---------- 系统信息 ---------- */ + String DN_CN = "*.herodotus.cn"; + String DN_C = "CN"; + String DN_ST = "YUNNAN"; + String DN_L = "KUNMING"; + String DN_O = "Herodotus"; String DN_OU = "Herodotus Cloud"; String WEBSITE = "https://www.herodotus.cn"; - String COPYRIGHT_DETAILS = "Apache-2.0 Licensed | Copyright © 2020-2030 码 匠 君"; + String COPYRIGHT_DETAILS = "AGPL-3.0 Licensed | Copyright © 2020-2030 码 匠 君"; String SYSTEM_NAME = DN_OU; String OPEN_API_SECURITY_SCHEME_BEARER_NAME = "HERODOTUS_AUTH"; - /* ---------- OAuth2 相关常量 ---------- */ String BEARER_TYPE = "Bearer"; @@ -89,19 +108,23 @@ public interface SystemConstants { String OIDC_CLIENT_REGISTRATION_ENDPOINT = "/connect/register"; String OIDC_LOGOUT_ENDPOINT = "/connect/logout"; String OIDC_USER_INFO_ENDPOINT = "/userinfo"; + String WEBAUTHN_AUTHENTICATE_OPTIONS_ENDPOINT = "/webauthn/authenticate/options"; + String WEBAUTHN_REGISTER_OPTIONS_ENDPOINT = "/webauthn/register/options"; + String WEBAUTHN_REGISTER_ENDPOINT = "/webauthn/register"; /** * OAuth2 Custom Endpoint */ String OAUTH2_AUTHORIZATION_CONSENT_URI = "/oauth2/consent"; String OAUTH2_DEVICE_ACTIVATION_URI = "/oauth2/device_activation"; - String OAUTH2_DEVICE_VERIFICATION_SUCCESS_URI = "/device_activated"; + String OAUTH2_DEVICE_VERIFICATION_SUCCESS_URI = "/device_activation_success"; String OAUTH2_DEVICE_VERIFICATION_FAILURE_URI = "/device_activation_failure"; /** - * Oauth2 模式类型 + * OAuth2 模式类型 */ String USERNAME = "username"; String PASSWORD = "password"; String SOCIAL_CREDENTIALS = "social_credentials"; + String WEBAUTHN_CREDENTIALS = "webauthn_credentials"; /** * OAuth2 Token Custom Attribute */ @@ -115,7 +138,7 @@ public interface SystemConstants { String LICENSE = "license"; String COPYRIGHT = "copyright"; /** - * 从 OidcScope 中拷贝的默认 Scope 方便以后使用 + * 从 OidcScope 中拷贝的 OAuth2 默认 Scope 方便以后使用 */ String SCOPE_OPENID = "openid"; String SCOPE_EMAIL = "email"; @@ -142,6 +165,7 @@ public interface SystemConstants { */ String MATCHER__STATIC = "/static/**"; String MATCHER__WEBJARS = "/webjars/**"; + String MATCHER__BPMN = "/engine-rest/**"; /** * 默认用户 Session 属性 */ @@ -149,7 +173,13 @@ public interface SystemConstants { /** * 签名算法属性 */ + String KEY__PRODUCT_KEY = "productKey"; + String KEY__DEVICE_NAME = "deviceName"; + String KEY__CLIENT_ID = "clientId"; + String KEY__SECURE_MODE = "securemode"; + String KEY__SIGNATURE_METHOD = "signMethod"; String KEY__TIMESTAMP = "timestamp"; + String KEY__AUTH_TYPE = "authType"; String KEY__RANDOM = "random"; /* ---------- OSS 相关常量 ---------- */ @@ -183,6 +213,6 @@ public interface SystemConstants { *

* 定义测试用途的通用目录,外部资源的统一使用和管控。 */ - String TESTING__WINDOWS_DEFAULT_FOLDER = "D:/workspaces/Testing"; + String TESTING__WINDOWS_DEFAULT_FOLDER = "D:/workspaces/testing"; } diff --git a/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/domain/Result.java b/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/domain/Result.java index ddf93b615..b6f74e8e8 100644 --- a/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/domain/Result.java +++ b/dante-framework/dante-core/src/main/java/cn/herodotus/dante/core/domain/Result.java @@ -269,14 +269,14 @@ public class Result extends Response { public Map toModel() { Map result = createModel(); result.put("data", getData()); - result.put("error", error); + result.put(SystemConstants.STATUS__ERROR, error); return result; } public Map toErrorModel() { Map result = createModel(); result.put("exception", getData()); - result.put("error", ObjectUtils.isNotEmpty(getError()) ? getError().getDetail() : StringUtils.EMPTY); + result.put(SystemConstants.STATUS__ERROR, ObjectUtils.isNotEmpty(getError()) ? getError().getDetail() : StringUtils.EMPTY); // result.put("trace", ObjectUtils.isNotEmpty(getError()) ? getError().getStackTrace() : null); return result; } diff --git a/dante-rest/dante-rest-identity/src/main/java/cn/herodotus/dante/rest/identity/controller/OpenDeviceController.java b/dante-rest/dante-rest-identity/src/main/java/cn/herodotus/dante/rest/identity/controller/OpenDeviceController.java index 479fed178..0855d4c8d 100644 --- a/dante-rest/dante-rest-identity/src/main/java/cn/herodotus/dante/rest/identity/controller/OpenDeviceController.java +++ b/dante-rest/dante-rest-identity/src/main/java/cn/herodotus/dante/rest/identity/controller/OpenDeviceController.java @@ -61,7 +61,7 @@ public class OpenDeviceController { return "activation-denied"; } - @GetMapping(value = "/", params = "success") + @GetMapping(value = "/", params = SystemConstants.STATUS__SUCCESS) public String success() { return "activation-allowed"; } -- Gitee From c23b35e97d235c5c42195a7e6f2546ef05b080fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 21 Aug 2026 14:07:48 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E2=9C=A8=20feat:=20v4.1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主要更新 - [升级] Spring Boot 版本升级至 4.1.1 - [升级] Spring Cloud 版本升级至 2025.1.3 - [升级] Spring AI 版本升级至 2.0.1 - [升级] springdoc 版本升级至 3.1.0 - [升级] liberica jdk 基础镜像版本升级至 25.0.4-9 - 其它更新 - [新增] 条件分页查询新增按更新时间默认排序工具方法 - [新增] Vuetify 版本前端新增表格线控制,支持横线、竖线、网格以及不显示四种模式 - [重构] 数据存储层抽象通用实体,数据审计时间字段统一修改为 LocaDateTime 类型 - [重构] 调整代码结构以及放置模块,提升模块代码内聚性降低耦合性 - [重构] SysUser 和 SysEmployee 实例配置增加 @JsonManagedReference 和 @JsonBackReference 注解,防止双向关联后 Jackson 序列化出现异常 - [重构] 新增状态常用常量值,并合并部分物联网应用常量值 - [修复] 修复数据库审计时间字段数据类型修改为 LocalDateTime 后生成时间与本地时间相差 8 小时问题 - [优化] 增加 asm 统一版本控制配置,消除工程中进入不同版本 asm 依赖 - [优化] p6spy 替换为 unikue p6spy 以支持 jdk 17 - [升级] actions/setup-java 版本升级至 5.6.0 - [升级] actions/checkout 版本升级至 7.0.1 - [升级] docker/login-action 版本升级至 4.6.0 - [升级] docker/setup-buildx-action 版本升级至 4.3.0 - [升级] grafana docker 镜像版本升级至 13.1.4 - [升级] loki docker 镜像版本升级至 3.7.6 - [升级] alloy docker 镜像版本升级至 1.18.1 - [升级] tempo docker 镜像版本升级至 3.0.3 - [升级] cassandra docker 镜像版本升级至 5.0.9 - [升级] influxdb docker 镜像版本升级至 3.10.5 - 依赖更新 - [升级] querydsl 版本升级至 7.6 - [升级] alipay-sdk-java 版本升级至 4.40.967.ALL - [升级] commons-collections4 版本升级至 4.6.0 - [升级] fastjson2 版本升级至 2.0.64 - [升级] guava 版本升级至 33.7.1 - [升级] hypersistence-utils-hibernate-73 版本升级至 3.15.5 - [升级] json-schema-validator 版本升级至 3.0.7 - [升级] langchain4j 版本升级至 1.19.0 - [升级] loki-logback-appender 版本升级至 2.1.0 - [升级] loki-protobuf 版本升级至 1.0.0_pb4.35.0 - [升级] operaton 版本升级至 2.2.0-M2 - [升级] redisson 版本升级至 4.7.0 - [升级] skywalking 相关插件版本升级至 9.7.0 - [升级] software.amazon.awssdk 版本升级至 2.54.1 - [升级] software.amazon.awssdk.crt 版本升级至 0.48.4 - [升级] swagger-core 版本升级至 2.2.54 - [升级] weixin java 版本升级至 4.8.5-20260818.151216 - [升级] webauthn4j 版本升级至 0.31.9.RELEASE - [升级] quasar webjars 版本升级至 2.25.1 - [升级] vue webjars 版本升级至 3.5.41 - [升级] classgraph 版本升级至 4.8.193 - [升级] joda-time 版本升级至 2.14.3 - [升级] objenesis 版本升级至 3.6 --- README.md | 18 +++++++++--------- dante-assistant/dante-assistant-access/pom.xml | 2 +- .../dante-assistant-captcha/pom.xml | 2 +- dante-assistant/dante-assistant-oss/pom.xml | 2 +- dante-assistant/pom.xml | 2 +- dante-data/dante-data-commons/pom.xml | 2 +- dante-data/dante-data-jpa/pom.xml | 2 +- dante-data/dante-data-rest/pom.xml | 2 +- dante-data/pom.xml | 2 +- dante-dependencies/pom.xml | 2 +- dante-framework/dante-autoconfigure/pom.xml | 2 +- dante-framework/dante-cache/pom.xml | 2 +- dante-framework/dante-core/pom.xml | 2 +- dante-framework/dante-hibernate/pom.xml | 2 +- dante-framework/dante-security/pom.xml | 2 +- dante-framework/dante-spring/pom.xml | 2 +- dante-framework/dante-web/pom.xml | 2 +- dante-framework/pom.xml | 2 +- dante-logic/dante-logic-identity/pom.xml | 2 +- dante-logic/dante-logic-message/pom.xml | 2 +- dante-logic/dante-logic-upms/pom.xml | 2 +- dante-logic/pom.xml | 2 +- .../dante-message-autoconfigure/pom.xml | 2 +- dante-message/dante-message-commons/pom.xml | 2 +- dante-message/dante-message-emqx/pom.xml | 2 +- .../dante-message-servlet-websocket/pom.xml | 2 +- dante-message/pom.xml | 2 +- .../dante-authentication-autoconfigure/pom.xml | 2 +- .../dante-authorization-autoconfigure/pom.xml | 2 +- .../dante-oauth2-authentication/pom.xml | 2 +- .../dante-oauth2-authorization/pom.xml | 2 +- dante-oauth2/dante-oauth2-commons/pom.xml | 2 +- dante-oauth2/dante-oauth2-extension/pom.xml | 2 +- dante-oauth2/pom.xml | 2 +- .../dante-persistence-autoconfigure/pom.xml | 2 +- .../dante-persistence-commons/pom.xml | 2 +- .../dante-persistence-sas-jpa/pom.xml | 2 +- dante-persistence/pom.xml | 2 +- dante-rest/dante-rest-identity/pom.xml | 2 +- dante-rest/dante-rest-message/pom.xml | 2 +- dante-rest/dante-rest-oss/pom.xml | 2 +- dante-rest/dante-rest-upms/pom.xml | 2 +- dante-rest/pom.xml | 2 +- .../cache-spring-boot-starter/pom.xml | 2 +- .../data-rdbms-spring-boot-starter/pom.xml | 2 +- .../logging-spring-boot-starter/pom.xml | 2 +- dante-starter/oss-spring-boot-starter/pom.xml | 2 +- dante-starter/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../tenant-spring-boot-starter/pom.xml | 2 +- dante-starter/web-spring-boot-starter/pom.xml | 2 +- .../webmvc-spring-boot-starter/pom.xml | 2 +- pom.xml | 2 +- 55 files changed, 63 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 8f8c8ef51..06eb259de 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ ---

- Spring Boot 4.1.0 - Spring Cloud 2025.1.2 + Spring Boot 4.1.1 + Spring Cloud 2025.1.3 Spring Cloud Alibaba 2025.1.0.0 Spring Cloud Tencent 2.1.2.0-2025.0.2 Nacos 3.2.3 @@ -15,11 +15,11 @@ 码匠君 License Apache 2.0 Java 25 - Version 4.1.0.4 - Dante Cloud 4.1.0.4 - ThingsBrain 4.1.0.4 - Dante Cloud UI 4.1.0.4 - Dante Cloud UI(New) 4.1.0.4 + Version 4.1.1.0 + Dante Cloud 4.1.1.0 + ThingsBrain 4.1.1.0 + Dante Cloud UI 4.1.1.0 + Dante Cloud UI(New) 4.1.1.0 Github star Github fork Gitee star @@ -155,8 +155,8 @@ dante-engine | 分支名称 | 对应 Spring 生态版本 | 对应 JDK 版本 | 用途 | 现状 | |:----------------------:|-----------------------------------------|-----------|----------------|-------------------------------------------------------------| -| master | Spring Boot 4.1 和 Spring Cloud 2025.1.2 | JDK 25 | 主要发布分支 | 推荐使用代码分支 | -| develop | Spring Boot 4.1 和 Spring Cloud 2025.1.2 | JDK 25 | Development 分支 | 新功能、ISSUE 均以此分支作为开发,发布后会 PR 至 master 分支 | +| master | Spring Boot 4.1 和 Spring Cloud 2025.1.3 | JDK 25 | 主要发布分支 | 推荐使用代码分支 | +| develop | Spring Boot 4.1 和 Spring Cloud 2025.1.3 | JDK 25 | Development 分支 | 新功能、ISSUE 均以此分支作为开发,发布后会 PR 至 master 分支 | | 4.0.X | Spring Boot 4.0 和 Spring Cloud 2025.1.1 | JDK 25 | 历史版本,停止维护 | 基于 Spring Boot 4.0 时代开发的代码分支,稳定可用,停止维护 | | 3.5.X | Spring Boot 3.5 和 Spring Cloud 2025.0.X | JDK 17 | 历史版本,停止维护 | 基于 Spring Boot 3.5 时代开发的代码分支,稳定可用,停止维护 | | 3.4.X | Spring Boot 3.4 和 Spring Cloud 2024.0.X | JDK 17 | 历史版本,停止维护 | 基于 Spring Boot 3.4 时代开发的代码分支,稳定可用,停止维护 | diff --git a/dante-assistant/dante-assistant-access/pom.xml b/dante-assistant/dante-assistant-access/pom.xml index 23e5d0ade..490d8c776 100644 --- a/dante-assistant/dante-assistant-access/pom.xml +++ b/dante-assistant/dante-assistant-access/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-assistant - 4.1.0.4 + 4.1.1.0 dante-assistant-access diff --git a/dante-assistant/dante-assistant-captcha/pom.xml b/dante-assistant/dante-assistant-captcha/pom.xml index ccd3dfd99..7dfb0c832 100644 --- a/dante-assistant/dante-assistant-captcha/pom.xml +++ b/dante-assistant/dante-assistant-captcha/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-assistant - 4.1.0.4 + 4.1.1.0 dante-assistant-captcha diff --git a/dante-assistant/dante-assistant-oss/pom.xml b/dante-assistant/dante-assistant-oss/pom.xml index 34de6cb7a..14cdd4d3a 100644 --- a/dante-assistant/dante-assistant-oss/pom.xml +++ b/dante-assistant/dante-assistant-oss/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-assistant - 4.1.0.4 + 4.1.1.0 dante-assistant-oss diff --git a/dante-assistant/pom.xml b/dante-assistant/pom.xml index 3146db740..50d927a16 100644 --- a/dante-assistant/pom.xml +++ b/dante-assistant/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-assistant diff --git a/dante-data/dante-data-commons/pom.xml b/dante-data/dante-data-commons/pom.xml index 503d391f9..f1ea19b6d 100644 --- a/dante-data/dante-data-commons/pom.xml +++ b/dante-data/dante-data-commons/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-data - 4.1.0.4 + 4.1.1.0 dante-data-commons diff --git a/dante-data/dante-data-jpa/pom.xml b/dante-data/dante-data-jpa/pom.xml index 1111c0640..ec321bbcc 100644 --- a/dante-data/dante-data-jpa/pom.xml +++ b/dante-data/dante-data-jpa/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-data - 4.1.0.4 + 4.1.1.0 dante-data-jpa diff --git a/dante-data/dante-data-rest/pom.xml b/dante-data/dante-data-rest/pom.xml index 43cc17c7b..c691bf3a5 100644 --- a/dante-data/dante-data-rest/pom.xml +++ b/dante-data/dante-data-rest/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-data - 4.1.0.4 + 4.1.1.0 dante-data-rest diff --git a/dante-data/pom.xml b/dante-data/pom.xml index ef6733480..3e55a47f5 100644 --- a/dante-data/pom.xml +++ b/dante-data/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-data diff --git a/dante-dependencies/pom.xml b/dante-dependencies/pom.xml index 76c7dbd77..568a815e6 100644 --- a/dante-dependencies/pom.xml +++ b/dante-dependencies/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.ecosystem herodotus-ecosystem-dependencies - 4.1.0.4 + 4.1.1.0 diff --git a/dante-framework/dante-autoconfigure/pom.xml b/dante-framework/dante-autoconfigure/pom.xml index 32cda5aa8..619cdbdd9 100644 --- a/dante-framework/dante-autoconfigure/pom.xml +++ b/dante-framework/dante-autoconfigure/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-autoconfigure diff --git a/dante-framework/dante-cache/pom.xml b/dante-framework/dante-cache/pom.xml index 1b14e6e3e..670322367 100644 --- a/dante-framework/dante-cache/pom.xml +++ b/dante-framework/dante-cache/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-cache diff --git a/dante-framework/dante-core/pom.xml b/dante-framework/dante-core/pom.xml index 10db88945..a9b5547a6 100644 --- a/dante-framework/dante-core/pom.xml +++ b/dante-framework/dante-core/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-core diff --git a/dante-framework/dante-hibernate/pom.xml b/dante-framework/dante-hibernate/pom.xml index 38e585d0c..df6a581b3 100644 --- a/dante-framework/dante-hibernate/pom.xml +++ b/dante-framework/dante-hibernate/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-hibernate diff --git a/dante-framework/dante-security/pom.xml b/dante-framework/dante-security/pom.xml index aa2f8634e..d77d504aa 100644 --- a/dante-framework/dante-security/pom.xml +++ b/dante-framework/dante-security/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-security diff --git a/dante-framework/dante-spring/pom.xml b/dante-framework/dante-spring/pom.xml index 108e99aa4..ee1aa7676 100644 --- a/dante-framework/dante-spring/pom.xml +++ b/dante-framework/dante-spring/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-spring diff --git a/dante-framework/dante-web/pom.xml b/dante-framework/dante-web/pom.xml index 5bc10a1aa..633502920 100644 --- a/dante-framework/dante-web/pom.xml +++ b/dante-framework/dante-web/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-framework - 4.1.0.4 + 4.1.1.0 dante-web diff --git a/dante-framework/pom.xml b/dante-framework/pom.xml index 2ecc84b31..f1cfff2b8 100644 --- a/dante-framework/pom.xml +++ b/dante-framework/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-framework diff --git a/dante-logic/dante-logic-identity/pom.xml b/dante-logic/dante-logic-identity/pom.xml index 8b312fac5..9a2b7ca53 100644 --- a/dante-logic/dante-logic-identity/pom.xml +++ b/dante-logic/dante-logic-identity/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-logic - 4.1.0.4 + 4.1.1.0 dante-logic-identity diff --git a/dante-logic/dante-logic-message/pom.xml b/dante-logic/dante-logic-message/pom.xml index 7e9013802..4e67f0bbe 100644 --- a/dante-logic/dante-logic-message/pom.xml +++ b/dante-logic/dante-logic-message/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-logic - 4.1.0.4 + 4.1.1.0 dante-logic-message diff --git a/dante-logic/dante-logic-upms/pom.xml b/dante-logic/dante-logic-upms/pom.xml index 1625fb58b..86af6e07f 100644 --- a/dante-logic/dante-logic-upms/pom.xml +++ b/dante-logic/dante-logic-upms/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-logic - 4.1.0.4 + 4.1.1.0 dante-logic-upms diff --git a/dante-logic/pom.xml b/dante-logic/pom.xml index 5c1636d2c..962b448e9 100644 --- a/dante-logic/pom.xml +++ b/dante-logic/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-logic diff --git a/dante-message/dante-message-autoconfigure/pom.xml b/dante-message/dante-message-autoconfigure/pom.xml index 448b3174b..042f3f192 100644 --- a/dante-message/dante-message-autoconfigure/pom.xml +++ b/dante-message/dante-message-autoconfigure/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-message - 4.1.0.4 + 4.1.1.0 dante-message-autoconfigure diff --git a/dante-message/dante-message-commons/pom.xml b/dante-message/dante-message-commons/pom.xml index 6d36d2b95..2288c86d4 100644 --- a/dante-message/dante-message-commons/pom.xml +++ b/dante-message/dante-message-commons/pom.xml @@ -32,7 +32,7 @@ dante-message cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-message-commons diff --git a/dante-message/dante-message-emqx/pom.xml b/dante-message/dante-message-emqx/pom.xml index 84fb4b638..4b6915a0b 100644 --- a/dante-message/dante-message-emqx/pom.xml +++ b/dante-message/dante-message-emqx/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.dante dante-message - 4.1.0.4 + 4.1.1.0 dante-message-emqx diff --git a/dante-message/dante-message-servlet-websocket/pom.xml b/dante-message/dante-message-servlet-websocket/pom.xml index 9731d0e8f..c70882d4e 100644 --- a/dante-message/dante-message-servlet-websocket/pom.xml +++ b/dante-message/dante-message-servlet-websocket/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-message - 4.1.0.4 + 4.1.1.0 dante-message-servlet-websocket diff --git a/dante-message/pom.xml b/dante-message/pom.xml index 267f954d1..5f1f7013c 100644 --- a/dante-message/pom.xml +++ b/dante-message/pom.xml @@ -32,7 +32,7 @@ dante-engine cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-message diff --git a/dante-oauth2/dante-authentication-autoconfigure/pom.xml b/dante-oauth2/dante-authentication-autoconfigure/pom.xml index f6a2f8135..c634b1be8 100644 --- a/dante-oauth2/dante-authentication-autoconfigure/pom.xml +++ b/dante-oauth2/dante-authentication-autoconfigure/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-oauth2 - 4.1.0.4 + 4.1.1.0 dante-authentication-autoconfigure diff --git a/dante-oauth2/dante-authorization-autoconfigure/pom.xml b/dante-oauth2/dante-authorization-autoconfigure/pom.xml index 59d42686a..da8430a27 100644 --- a/dante-oauth2/dante-authorization-autoconfigure/pom.xml +++ b/dante-oauth2/dante-authorization-autoconfigure/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-oauth2 - 4.1.0.4 + 4.1.1.0 dante-authorization-autoconfigure diff --git a/dante-oauth2/dante-oauth2-authentication/pom.xml b/dante-oauth2/dante-oauth2-authentication/pom.xml index 651719a67..9d41c47b8 100644 --- a/dante-oauth2/dante-oauth2-authentication/pom.xml +++ b/dante-oauth2/dante-oauth2-authentication/pom.xml @@ -33,7 +33,7 @@ dante-oauth2 cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-oauth2-authentication diff --git a/dante-oauth2/dante-oauth2-authorization/pom.xml b/dante-oauth2/dante-oauth2-authorization/pom.xml index 05556b3e5..41fdaf916 100644 --- a/dante-oauth2/dante-oauth2-authorization/pom.xml +++ b/dante-oauth2/dante-oauth2-authorization/pom.xml @@ -32,7 +32,7 @@ dante-oauth2 cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-oauth2-authorization diff --git a/dante-oauth2/dante-oauth2-commons/pom.xml b/dante-oauth2/dante-oauth2-commons/pom.xml index 791a49ebd..e79aaaaaa 100644 --- a/dante-oauth2/dante-oauth2-commons/pom.xml +++ b/dante-oauth2/dante-oauth2-commons/pom.xml @@ -32,7 +32,7 @@ dante-oauth2 cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-oauth2-commons diff --git a/dante-oauth2/dante-oauth2-extension/pom.xml b/dante-oauth2/dante-oauth2-extension/pom.xml index f8cee5bdb..0cf939a78 100644 --- a/dante-oauth2/dante-oauth2-extension/pom.xml +++ b/dante-oauth2/dante-oauth2-extension/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-oauth2 - 4.1.0.4 + 4.1.1.0 dante-oauth2-extension diff --git a/dante-oauth2/pom.xml b/dante-oauth2/pom.xml index c458a44e2..5a74a0174 100644 --- a/dante-oauth2/pom.xml +++ b/dante-oauth2/pom.xml @@ -32,7 +32,7 @@ dante-engine cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-oauth2 diff --git a/dante-persistence/dante-persistence-autoconfigure/pom.xml b/dante-persistence/dante-persistence-autoconfigure/pom.xml index 1d94e3efd..0d5983a2a 100644 --- a/dante-persistence/dante-persistence-autoconfigure/pom.xml +++ b/dante-persistence/dante-persistence-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.dante dante-persistence - 4.1.0.4 + 4.1.1.0 dante-persistence-autoconfigure diff --git a/dante-persistence/dante-persistence-commons/pom.xml b/dante-persistence/dante-persistence-commons/pom.xml index fd818b513..8cfdc8d7f 100644 --- a/dante-persistence/dante-persistence-commons/pom.xml +++ b/dante-persistence/dante-persistence-commons/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.dante dante-persistence - 4.1.0.4 + 4.1.1.0 dante-persistence-commons diff --git a/dante-persistence/dante-persistence-sas-jpa/pom.xml b/dante-persistence/dante-persistence-sas-jpa/pom.xml index 600844708..1363991df 100644 --- a/dante-persistence/dante-persistence-sas-jpa/pom.xml +++ b/dante-persistence/dante-persistence-sas-jpa/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.dante dante-persistence - 4.1.0.4 + 4.1.1.0 dante-persistence-sas-jpa diff --git a/dante-persistence/pom.xml b/dante-persistence/pom.xml index f86b329cf..3db9ffc20 100644 --- a/dante-persistence/pom.xml +++ b/dante-persistence/pom.xml @@ -7,7 +7,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-persistence diff --git a/dante-rest/dante-rest-identity/pom.xml b/dante-rest/dante-rest-identity/pom.xml index f81cfae4f..7172d398b 100644 --- a/dante-rest/dante-rest-identity/pom.xml +++ b/dante-rest/dante-rest-identity/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-rest - 4.1.0.4 + 4.1.1.0 dante-rest-identity diff --git a/dante-rest/dante-rest-message/pom.xml b/dante-rest/dante-rest-message/pom.xml index 6dcf9ca9a..241ba13bd 100644 --- a/dante-rest/dante-rest-message/pom.xml +++ b/dante-rest/dante-rest-message/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-rest - 4.1.0.4 + 4.1.1.0 dante-rest-message diff --git a/dante-rest/dante-rest-oss/pom.xml b/dante-rest/dante-rest-oss/pom.xml index 8f08ca034..1b95cad87 100644 --- a/dante-rest/dante-rest-oss/pom.xml +++ b/dante-rest/dante-rest-oss/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-rest - 4.1.0.4 + 4.1.1.0 dante-rest-oss diff --git a/dante-rest/dante-rest-upms/pom.xml b/dante-rest/dante-rest-upms/pom.xml index 4d57b288b..eb81898bd 100644 --- a/dante-rest/dante-rest-upms/pom.xml +++ b/dante-rest/dante-rest-upms/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-rest - 4.1.0.4 + 4.1.1.0 dante-rest-upms diff --git a/dante-rest/pom.xml b/dante-rest/pom.xml index 7048465d0..cf1f49c5c 100644 --- a/dante-rest/pom.xml +++ b/dante-rest/pom.xml @@ -32,7 +32,7 @@ dante-engine cn.herodotus.dante - 4.1.0.4 + 4.1.1.0 dante-rest diff --git a/dante-starter/cache-spring-boot-starter/pom.xml b/dante-starter/cache-spring-boot-starter/pom.xml index 9478a98d9..21b28a271 100644 --- a/dante-starter/cache-spring-boot-starter/pom.xml +++ b/dante-starter/cache-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 cache-spring-boot-starter diff --git a/dante-starter/data-rdbms-spring-boot-starter/pom.xml b/dante-starter/data-rdbms-spring-boot-starter/pom.xml index 55073dd40..7fcc4692a 100644 --- a/dante-starter/data-rdbms-spring-boot-starter/pom.xml +++ b/dante-starter/data-rdbms-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 data-rdbms-spring-boot-starter diff --git a/dante-starter/logging-spring-boot-starter/pom.xml b/dante-starter/logging-spring-boot-starter/pom.xml index f56a2fd77..e3bd4daa4 100644 --- a/dante-starter/logging-spring-boot-starter/pom.xml +++ b/dante-starter/logging-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 logging-spring-boot-starter diff --git a/dante-starter/oss-spring-boot-starter/pom.xml b/dante-starter/oss-spring-boot-starter/pom.xml index 3b670337b..fcdb8a8de 100644 --- a/dante-starter/oss-spring-boot-starter/pom.xml +++ b/dante-starter/oss-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 oss-spring-boot-starter diff --git a/dante-starter/pom.xml b/dante-starter/pom.xml index dffd2f52a..83756e061 100644 --- a/dante-starter/pom.xml +++ b/dante-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-engine - 4.1.0.4 + 4.1.1.0 dante-starter diff --git a/dante-starter/reactive-container-spring-boot-starter/pom.xml b/dante-starter/reactive-container-spring-boot-starter/pom.xml index b57a1c28f..7cd498df8 100644 --- a/dante-starter/reactive-container-spring-boot-starter/pom.xml +++ b/dante-starter/reactive-container-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 reactive-container-spring-boot-starter diff --git a/dante-starter/servlet-container-spring-boot-starter/pom.xml b/dante-starter/servlet-container-spring-boot-starter/pom.xml index 98f727e66..63061d220 100644 --- a/dante-starter/servlet-container-spring-boot-starter/pom.xml +++ b/dante-starter/servlet-container-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 servlet-container-spring-boot-starter diff --git a/dante-starter/servlet-message-spring-boot-starter/pom.xml b/dante-starter/servlet-message-spring-boot-starter/pom.xml index bb0d4f702..cd30e384c 100644 --- a/dante-starter/servlet-message-spring-boot-starter/pom.xml +++ b/dante-starter/servlet-message-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 servlet-message-spring-boot-starter diff --git a/dante-starter/tenant-spring-boot-starter/pom.xml b/dante-starter/tenant-spring-boot-starter/pom.xml index 8e9799b1f..fae15f981 100644 --- a/dante-starter/tenant-spring-boot-starter/pom.xml +++ b/dante-starter/tenant-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 tenant-spring-boot-starter diff --git a/dante-starter/web-spring-boot-starter/pom.xml b/dante-starter/web-spring-boot-starter/pom.xml index 295ce34a5..feed943cf 100644 --- a/dante-starter/web-spring-boot-starter/pom.xml +++ b/dante-starter/web-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 web-spring-boot-starter diff --git a/dante-starter/webmvc-spring-boot-starter/pom.xml b/dante-starter/webmvc-spring-boot-starter/pom.xml index f32e244a0..695d29ff2 100644 --- a/dante-starter/webmvc-spring-boot-starter/pom.xml +++ b/dante-starter/webmvc-spring-boot-starter/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.dante dante-starter - 4.1.0.4 + 4.1.1.0 webmvc-spring-boot-starter diff --git a/pom.xml b/pom.xml index 3f4660a1c..72f77eb29 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ cn.herodotus.ecosystem herodotus-ecosystem-parent - 4.1.0.4 + 4.1.1.0 -- Gitee From e150781af7dc7f5de6b195f581130300d7865a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 21 Aug 2026 16:12:44 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E2=9C=A8=20feat:=20v4.1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主要更新 - [升级] Spring Boot 版本升级至 4.1.1 - [升级] Spring Cloud 版本升级至 2025.1.3 - [升级] Spring AI 版本升级至 2.0.1 - [升级] springdoc 版本升级至 3.1.0 - [升级] liberica jdk 基础镜像版本升级至 25.0.4-9 - 其它更新 - [新增] 条件分页查询新增按更新时间默认排序工具方法 - [新增] Vuetify 版本前端新增表格线控制,支持横线、竖线、网格以及不显示四种模式 - [重构] 数据存储层抽象通用实体,数据审计时间字段统一修改为 LocaDateTime 类型 - [重构] 调整代码结构以及放置模块,提升模块代码内聚性降低耦合性 - [重构] SysUser 和 SysEmployee 实例配置增加 @JsonManagedReference 和 @JsonBackReference 注解,防止双向关联后 Jackson 序列化出现异常 - [重构] 新增状态常用常量值,并合并部分物联网应用常量值 - [修复] 修复数据库审计时间字段数据类型修改为 LocalDateTime 后生成时间与本地时间相差 8 小时问题 - [优化] 增加 asm 统一版本控制配置,消除工程中进入不同版本 asm 依赖 - [优化] p6spy 替换为 unikue p6spy 以支持 jdk 17 - [升级] actions/setup-java 版本升级至 5.6.0 - [升级] actions/checkout 版本升级至 7.0.1 - [升级] docker/login-action 版本升级至 4.6.0 - [升级] docker/setup-buildx-action 版本升级至 4.3.0 - [升级] grafana docker 镜像版本升级至 13.1.4 - [升级] loki docker 镜像版本升级至 3.7.6 - [升级] alloy docker 镜像版本升级至 1.18.1 - [升级] tempo docker 镜像版本升级至 3.0.3 - [升级] cassandra docker 镜像版本升级至 5.0.9 - [升级] influxdb docker 镜像版本升级至 3.10.5 - 依赖更新 - [升级] querydsl 版本升级至 7.6 - [升级] alipay-sdk-java 版本升级至 4.40.967.ALL - [升级] commons-collections4 版本升级至 4.6.0 - [升级] fastjson2 版本升级至 2.0.64 - [升级] guava 版本升级至 33.7.1 - [升级] hypersistence-utils-hibernate-73 版本升级至 3.15.5 - [升级] json-schema-validator 版本升级至 3.0.7 - [升级] langchain4j 版本升级至 1.19.0 - [升级] loki-logback-appender 版本升级至 2.1.0 - [升级] loki-protobuf 版本升级至 1.0.0_pb4.35.0 - [升级] operaton 版本升级至 2.2.0-M2 - [升级] redisson 版本升级至 4.7.0 - [升级] skywalking 相关插件版本升级至 9.7.0 - [升级] software.amazon.awssdk 版本升级至 2.54.1 - [升级] software.amazon.awssdk.crt 版本升级至 0.48.4 - [升级] swagger-core 版本升级至 2.2.54 - [升级] weixin java 版本升级至 4.8.5-20260818.151216 - [升级] webauthn4j 版本升级至 0.31.9.RELEASE - [升级] quasar webjars 版本升级至 2.25.1 - [升级] vue webjars 版本升级至 3.5.41 - [升级] classgraph 版本升级至 4.8.193 - [升级] joda-time 版本升级至 2.14.3 - [升级] objenesis 版本升级至 3.6 --- .../ResourceServiceMessageAutoConfiguration.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/ResourceServiceMessageAutoConfiguration.java b/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/ResourceServiceMessageAutoConfiguration.java index d93a9e830..55e1f31d2 100644 --- a/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/ResourceServiceMessageAutoConfiguration.java +++ b/dante-oauth2/dante-authorization-autoconfigure/src/main/java/cn/herodotus/dante/oauth2/authorization/autoconfigure/ResourceServiceMessageAutoConfiguration.java @@ -26,10 +26,12 @@ package cn.herodotus.dante.oauth2.authorization.autoconfigure; import cn.herodotus.dante.message.commons.definition.strategy.EnumDictionaryCollectEventManager; +import cn.herodotus.dante.message.commons.definition.strategy.MessageSendingEventManager; import cn.herodotus.dante.message.commons.definition.strategy.RestMappingCollectEventManager; import cn.herodotus.dante.oauth2.authorization.attribute.SecurityAttributeAnalyzer; import cn.herodotus.dante.oauth2.authorization.autoconfigure.listener.RemoteAttributeDistributionListener; import cn.herodotus.dante.oauth2.authorization.autoconfigure.strategy.DefaultEnumDictionaryCollectEventManager; +import cn.herodotus.dante.oauth2.authorization.autoconfigure.strategy.DefaultMessageSendingEventManager; import cn.herodotus.dante.oauth2.authorization.autoconfigure.strategy.DefaultRestMappingCollectEventManager; import cn.herodotus.dante.spring.condition.ConditionalOnArchitecture; import cn.herodotus.dante.spring.enums.Architecture; @@ -79,6 +81,14 @@ public class ResourceServiceMessageAutoConfiguration { return manager; } + @Bean + public MessageSendingEventManager messageSendingEventManager() { + DefaultMessageSendingEventManager manager = new DefaultMessageSendingEventManager(); + log.trace("[Herodotus] |- Bean [Unified Message Sending Event Manager] Configure."); + return manager; + } + + @Configuration(proxyBeanMethods = false) @ConditionalOnClass(StreamBusBridge.class) @ConditionalOnArchitecture(Architecture.DISTRIBUTED) -- Gitee From 294b4475ee8d6b74f46da7feb3b972905655f389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 21 Aug 2026 17:54:43 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E2=9C=A8=20feat:=20v4.1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主要更新 - [升级] Spring Boot 版本升级至 4.1.1 - [升级] Spring Cloud 版本升级至 2025.1.3 - [升级] Spring AI 版本升级至 2.0.1 - [升级] springdoc 版本升级至 3.1.0 - [升级] liberica jdk 基础镜像版本升级至 25.0.4-9 - 其它更新 - [新增] 条件分页查询新增按更新时间默认排序工具方法 - [新增] Vuetify 版本前端新增表格线控制,支持横线、竖线、网格以及不显示四种模式 - [重构] 数据存储层抽象通用实体,数据审计时间字段统一修改为 LocaDateTime 类型 - [重构] 调整代码结构以及放置模块,提升模块代码内聚性降低耦合性 - [重构] SysUser 和 SysEmployee 实例配置增加 @JsonManagedReference 和 @JsonBackReference 注解,防止双向关联后 Jackson 序列化出现异常 - [重构] 新增状态常用常量值,并合并部分物联网应用常量值 - [修复] 修复数据库审计时间字段数据类型修改为 LocalDateTime 后生成时间与本地时间相差 8 小时问题 - [优化] 增加 asm 统一版本控制配置,消除工程中进入不同版本 asm 依赖 - [优化] p6spy 替换为 unikue p6spy 以支持 jdk 17 - [升级] actions/setup-java 版本升级至 5.6.0 - [升级] actions/checkout 版本升级至 7.0.1 - [升级] docker/login-action 版本升级至 4.6.0 - [升级] docker/setup-buildx-action 版本升级至 4.3.0 - [升级] grafana docker 镜像版本升级至 13.1.4 - [升级] loki docker 镜像版本升级至 3.7.6 - [升级] alloy docker 镜像版本升级至 1.18.1 - [升级] tempo docker 镜像版本升级至 3.0.3 - [升级] cassandra docker 镜像版本升级至 5.0.9 - [升级] influxdb docker 镜像版本升级至 3.10.5 - 依赖更新 - [升级] querydsl 版本升级至 7.6 - [升级] alipay-sdk-java 版本升级至 4.40.967.ALL - [升级] commons-collections4 版本升级至 4.6.0 - [升级] fastjson2 版本升级至 2.0.64 - [升级] guava 版本升级至 33.7.1 - [升级] hypersistence-utils-hibernate-73 版本升级至 3.15.5 - [升级] json-schema-validator 版本升级至 3.0.7 - [升级] langchain4j 版本升级至 1.19.0 - [升级] loki-logback-appender 版本升级至 2.1.0 - [升级] loki-protobuf 版本升级至 1.0.0_pb4.35.0 - [升级] operaton 版本升级至 2.2.0-M2 - [升级] redisson 版本升级至 4.7.0 - [升级] skywalking 相关插件版本升级至 9.7.0 - [升级] software.amazon.awssdk 版本升级至 2.54.1 - [升级] software.amazon.awssdk.crt 版本升级至 0.48.4 - [升级] swagger-core 版本升级至 2.2.54 - [升级] weixin java 版本升级至 4.8.5-20260818.151216 - [升级] webauthn4j 版本升级至 0.31.9.RELEASE - [升级] quasar webjars 版本升级至 2.25.1 - [升级] vue webjars 版本升级至 3.5.41 - [升级] classgraph 版本升级至 4.8.193 - [升级] joda-time 版本升级至 2.14.3 - [升级] objenesis 版本升级至 3.6 --- .../emqx/WebhookMapToEventTransformer.java | 1 - .../event/IntegrationEventAutoConfiguration.java | 2 +- .../message/MessageAutoConfiguration.java | 2 +- .../mqtt/IntegrationMqttAutoConfiguration.java | 10 +++++----- .../message/autoconfigure/mqtt/MqttProperties.java | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/emqx/WebhookMapToEventTransformer.java b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/emqx/WebhookMapToEventTransformer.java index 5467d41e9..061e73b0a 100644 --- a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/emqx/WebhookMapToEventTransformer.java +++ b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/emqx/WebhookMapToEventTransformer.java @@ -51,7 +51,6 @@ class WebhookMapToEventTransformer extends AbstractPayloadTransformer - * 该配置主要用于系统的统一消息发送。因为不同的类型的消息,发送逻辑不同,所以目前只处理 {@link MqttMessageSendingEvent} 两种事件。 + * 该配置主要用于系统的统一消息发送。因为不同的类型的消息,发送逻辑不同,所以目前只处理 {@link MailMessageSendingEvent} 和 {@link MqttMessageSendingEvent} 两种事件。 * * @return {@link ApplicationEventListeningMessageProducer} */ diff --git a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/message/MessageAutoConfiguration.java b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/message/MessageAutoConfiguration.java index 116500097..d9acdeaab 100644 --- a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/message/MessageAutoConfiguration.java +++ b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/message/MessageAutoConfiguration.java @@ -45,7 +45,7 @@ public class MessageAutoConfiguration { @PostConstruct public void postConstruct() { - log.info("[Herodotus] |- Auto [Message] Configure."); + log.info("[Herodotus] |- Auto [Unified Message] Configure."); } @Bean diff --git a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/IntegrationMqttAutoConfiguration.java b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/IntegrationMqttAutoConfiguration.java index 5f5e0e631..23dd4c6b4 100644 --- a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/IntegrationMqttAutoConfiguration.java +++ b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/IntegrationMqttAutoConfiguration.java @@ -151,15 +151,15 @@ public class IntegrationMqttAutoConfiguration { @Qualifier(Channels.MQTT__DEFAULT_INBOUND_TO_EVENT_CHANNEL) MessageChannel mqttDefaultInboundToEventChannel) { // 接收 mqtt 指定 topic 中的消息 - Mqttv5PahoMessageDrivenChannelAdapter messageProducer = new Mqttv5PahoMessageDrivenChannelAdapter(clientManager, ListUtils.toStringArray(mqttProperties.getDefaultSubscribes())); - messageProducer.setManualAcks(false); - messageProducer.setOutputChannel(mqttDefaultInboundChannel); - messageProducer.setErrorChannelName(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME); + Mqttv5PahoMessageDrivenChannelAdapter adapter = new Mqttv5PahoMessageDrivenChannelAdapter(clientManager, ListUtils.toStringArray(mqttProperties.getDefaultSubscribes())); + adapter.setManualAcks(false); + adapter.setOutputChannel(mqttDefaultInboundChannel); + adapter.setErrorChannelName(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME); log.trace("[Herodotus] |- Bean [Mqtt v5 Paho Message Driven Channel Adapter] Configure."); // 将 mqtt 指定 topic 中的消息,转换成 Event,通过 ApplicationEventPublishingMessageHandler 发送出去。 // 这种实现主要用于解决 mqtt 消息接收的解耦 - return IntegrationFlow.from(messageProducer) + return IntegrationFlow.from(adapter) .transform(new DefaultMessageToEventTransformer()) .channel(mqttDefaultInboundToEventChannel) .handle(applicationEventPublishingMessageHandler) diff --git a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/MqttProperties.java b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/MqttProperties.java index 01fa8c207..f04d4d6c9 100644 --- a/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/MqttProperties.java +++ b/dante-message/dante-message-autoconfigure/src/main/java/cn/herodotus/dante/message/autoconfigure/mqtt/MqttProperties.java @@ -116,7 +116,7 @@ public class MqttProperties { *

* 当客户端确定不再需要该会话时,应以会话过期间隔设为0的方式断开连接。 */ - private Duration sessionExpiryInterval = Duration.ofSeconds(600); + private Duration sessionExpiryInterval = Duration.ofDays(1); /** * 默认的主题。如果消息中不存在 mqtt_topic 头,则使用该值作为默认主题。 */ -- Gitee