From 5ebea680d776c0647f83a5e4d1038b8708b3f3e7 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 14 十二月 2023 11:23:42 +0800 Subject: [PATCH] 1、优化多数据源模块代码; 2、优化通信中间件代码; 3、通信中间件数据库插入数据测试Po、Mapper.java、Mapper.xml --- pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 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..88f7105 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,6 +2,7 @@ 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; @@ -10,15 +11,21 @@ @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"}) +@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{ @@ -31,6 +38,14 @@ } private void startAceSv(){ + if(sv != null){ + sv.startServer(); + } + } + private Server sv ; + @Autowired + public void setSv(Server sv){ + this.sv = sv ; } } -- Gitblit v1.8.0