Browse Source

:bug: Fixing a bug. 修复TransactionalEventListener 监听事件时无法处理 WebServerInitializedEvent 事件

aeizzz 1 year ago
parent
commit
6bb3dca7a2

+ 8 - 1
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/config/ClientDetailsInitRunner.java

@@ -39,9 +39,16 @@ public class ClientDetailsInitRunner implements InitializingBean {
 
 
 	private final RedisTemplate redisTemplate;
 	private final RedisTemplate redisTemplate;
 
 
+
+	@Async
+	@Order
+	@EventListener({ WebServerInitializedEvent.class })
+	public void WebServerInit(){
+		this.initClientDetails();
+	}
 	@Async
 	@Async
 	@Order
 	@Order
-	@EventListener({ WebServerInitializedEvent.class, ClientDetailsInitEvent.class })
+	@EventListener({ ClientDetailsInitEvent.class })
 	public void initClientDetails() {
 	public void initClientDetails() {
 		log.debug("初始化客户端信息开始 ");
 		log.debug("初始化客户端信息开始 ");