From 96a619620c8268f523cb8ce5c18fa3fc11bc5b03 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 15 五月 2024 14:11:16 +0800
Subject: [PATCH] 增加了单数据源的Configuration,在SpringBoot的启动类Application中对其排除
---
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/PipIrrIrrigateApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/PipIrrSellApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/java/com/dy/pipIrrGis/PipIrrGisApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/PipIrrProjectApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/PipIrrRemoteApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/PipIrrStatisticsApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/java/com/dy/pipIrrDemo/PipIrrDemoApplication.java | 9 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/PipIrrSsoApplication.java | 9 ++++
9 files changed, 72 insertions(+), 9 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
index ad605ba..1089355 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
@@ -6,11 +6,18 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrBase"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrBase"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"})
public class PipIrrBaseApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/java/com/dy/pipIrrDemo/PipIrrDemoApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/java/com/dy/pipIrrDemo/PipIrrDemoApplication.java
index e5b0bd1..06eeafc 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/java/com/dy/pipIrrDemo/PipIrrDemoApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/java/com/dy/pipIrrDemo/PipIrrDemoApplication.java
@@ -6,11 +6,18 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrDemo"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrDemo"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoDemo"})
public class PipIrrDemoApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/java/com/dy/pipIrrGis/PipIrrGisApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/java/com/dy/pipIrrGis/PipIrrGisApplication.java
index a7d14f6..0ce7e2a 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/java/com/dy/pipIrrGis/PipIrrGisApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/java/com/dy/pipIrrGis/PipIrrGisApplication.java
@@ -6,12 +6,19 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrGis"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrGis"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"})
public class PipIrrGisApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/PipIrrIrrigateApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/PipIrrIrrigateApplication.java
index 443df6d..262614c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/PipIrrIrrigateApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/PipIrrIrrigateApplication.java
@@ -6,11 +6,18 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrIrrigate"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrIrrigate"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan({"com.dy.pipIrrGlobal.daoIr", "com.dy.pipIrrGlobal.daoIr"})
public class PipIrrIrrigateApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/PipIrrProjectApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/PipIrrProjectApplication.java
index f73cd42..88c5951 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/PipIrrProjectApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/PipIrrProjectApplication.java
@@ -6,6 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.context.annotation.FilterType;
/**
* @author ZhuBaoMin
@@ -17,7 +18,13 @@
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrProject"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrProject"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan({"com.dy.pipIrrGlobal.daoPr", "com.dy.pipIrrGlobal.daoBa"})
public class PipIrrProjectApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/PipIrrRemoteApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/PipIrrRemoteApplication.java
index 4b2849f..e5bb6de 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/PipIrrRemoteApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/PipIrrRemoteApplication.java
@@ -6,11 +6,18 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrRemote"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrRemote"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"})
public class PipIrrRemoteApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/PipIrrSellApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/PipIrrSellApplication.java
index f8b120d..45e2f21 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/PipIrrSellApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/PipIrrSellApplication.java
@@ -7,6 +7,7 @@
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.context.annotation.FilterType;
/**
* @author ZhuBaoMin
@@ -19,7 +20,13 @@
@EnableAspectJAutoProxy
@EnableMultiDataSource
@EnableConfigurationProperties
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrSell"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrSell"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan({"com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoBa"})
public class PipIrrSellApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/PipIrrSsoApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/PipIrrSsoApplication.java
index e7795b6..ff55333 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/PipIrrSsoApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/java/com/dy/sso/PipIrrSsoApplication.java
@@ -8,12 +8,19 @@
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.context.annotation.FilterType;
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableMultiDataSource
@EnableCaching//寮�鍚娇鐢ㄧ紦瀛�
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.sso"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.sso"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"})
@Slf4j
public class PipIrrSsoApplication {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/PipIrrStatisticsApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/PipIrrStatisticsApplication.java
index 3e592a0..bd2ef1d 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/PipIrrStatisticsApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/PipIrrStatisticsApplication.java
@@ -6,11 +6,18 @@
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
@EnableMultiDataSource
-@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrStatistics"})
+@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrStatistics"},
+ excludeFilters = {
+ @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
+ com.dy.common.singleDataSource.DruidDataSourceConfig.class //鎺掗櫎鍗曟暟鎹簮
+ })
+ }
+)
@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa"})
public class PipIrrStatisticsApplication {
--
Gitblit v1.8.0