From 6de539c46205a6e26eaab24be2e1a21f9054af08 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 16 一月 2024 17:10:14 +0800 Subject: [PATCH] 1、完善通信中单件对上行数据处理的逻辑及代码 --- pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java index bae96a4..cfd1eef 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java @@ -2,35 +2,57 @@ import com.dy.common.multiDataSource.EnableMultiDataSource; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.context.annotation.FilterType; @SpringBootApplication @EnableAspectJAutoProxy +//@EnableAspectJAutoProxy(exposeProxy=true)//瑙乭ttps://blog.csdn.net/qq_32590703/article/details/109320381 @EnableMultiDataSource -@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.aceMw"}) -@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"}) +@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.aceMw"}, + excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = { + com.dy.common.apiDoc.SpringApiConfig.class + }) }) +//@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.aceMw"}) +@MapperScan(basePackages={"com.dy.pipIrrGlobal.test","com.dy.pipIrrGlobal.daoRm"}) public class PipIrrMwAcceptApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(PipIrrMwAcceptApplication.class, args); } + /** + * Spring瀹瑰櫒鍚姩瀹屾垚鍚庯紝鎵ц涓嬮潰鏂规硶 + * @param args 鍙傛暟 + * @throws Exception 寮傚父 + */ @Override public void run(String... args) throws Exception { try{ //绛夊緟鏁版嵁搴撳垵濮嬪寲瀹屾垚 Thread.sleep(1000L); - }catch (Exception e){} + }catch (Exception e){ + e.printStackTrace(); + } finally { this.startAceSv() ; } } private void startAceSv(){ + if(sv != null){ + sv.startServer(); + } + } + private Server sv ; + @Autowired + public void setSv(Server sv){ + this.sv = sv ; } } -- Gitblit v1.8.0