From 3a38adf05aad83ca5b34d3037bd6380596b792e0 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 28 八月 2024 17:21:13 +0800 Subject: [PATCH] 1、通信中間件增加下控制器日志文件功能; 2、功能66解析中心IP和端口bug修改。 --- pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java index 9098e5b..7a24c20 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/util/SsoListener.java @@ -1,22 +1,31 @@ package com.dy.sso.util; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletContextEvent; -import jakarta.servlet.ServletContextListener; -import lombok.extern.slf4j.Slf4j; +import com.dy.pipIrrGlobal.util.OrgListenerSupport; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.event.ApplicationReadyEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.core.io.ResourceLoader; +import org.springframework.stereotype.Component; -@Slf4j -public class SsoListener implements ServletContextListener { +@Component +public class SsoListener extends OrgListenerSupport implements ApplicationListener<ApplicationReadyEvent> { + + @Autowired + protected ResourceLoader resourceLoader ; + @Override - public void contextInitialized(ServletContextEvent event) { - ServletContextListener.super.contextInitialized(event); - ServletContext con = event.getServletContext(); + public void onApplicationEvent(ApplicationReadyEvent event) { + try { + //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource瀹炲鍖栧畬鎴� + Thread.sleep(1000L); + } catch (InterruptedException e) { + e.printStackTrace(); + } finally { + //鍒濆鍖栨満鏋� + super.init(resourceLoader); + } } - @Override - public void contextDestroyed(ServletContextEvent event) { - ServletContextListener.super.contextDestroyed(event); - } } \ No newline at end of file -- Gitblit v1.8.0