From 411f4cdac20344fa27c9f862091ecd7f6dff28c4 Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Sun, 15 Nov 2020 15:08:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=AC=E5=85=B1=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0spring.factories=E5=AE=9E=E7=8E=B0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E8=BD=BD=E9=A1=B9=E5=85=B3=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- youlai-admin/admin-api/pom.xml | 2 +- youlai-auth/pom.xml | 2 +- .../src/main/java/com/youlai/{ => auth}/AuthApplication.java | 2 +- youlai-common/{common-db => common-database}/pom.xml | 2 +- .../com/youlai/common/database}/config/MybatisPlusConfig.java | 4 ++-- .../java/com/youlai/common/database}/handler/MetaHandler.java | 2 +- .../src/main/resources/META-INF/spring.factories | 2 ++ .../src/main/resources/META-INF/spring.factories | 2 ++ .../common-redis/src/main/resources/META-INF/spring.factories | 2 ++ .../common-web/src/main/resources/META-INF/spring.factories | 3 +++ youlai-common/pom.xml | 4 ++-- .../java/com/youlai/{ => gateway}/GatewayApplication.java | 4 ++-- 12 files changed, 20 insertions(+), 11 deletions(-) rename youlai-auth/src/main/java/com/youlai/{ => auth}/AuthApplication.java (94%) rename youlai-common/{common-db => common-database}/pom.xml (95%) rename youlai-common/{common-db/src/main/java/com/youlai/common/db => common-database/src/main/java/com/youlai/common/database}/config/MybatisPlusConfig.java (90%) rename youlai-common/{common-db/src/main/java/com/youlai/common/db => common-database/src/main/java/com/youlai/common/database}/handler/MetaHandler.java (93%) create mode 100644 youlai-common/common-database/src/main/resources/META-INF/spring.factories create mode 100644 youlai-common/common-knife4j/src/main/resources/META-INF/spring.factories create mode 100644 youlai-common/common-redis/src/main/resources/META-INF/spring.factories create mode 100644 youlai-common/common-web/src/main/resources/META-INF/spring.factories rename youlai-gateway/src/main/java/com/youlai/{ => gateway}/GatewayApplication.java (92%) diff --git a/youlai-admin/admin-api/pom.xml b/youlai-admin/admin-api/pom.xml index 990a57adc..cb37f688e 100644 --- a/youlai-admin/admin-api/pom.xml +++ b/youlai-admin/admin-api/pom.xml @@ -37,7 +37,7 @@ com.youlai - common-db + common-database ${youlai.version} diff --git a/youlai-auth/pom.xml b/youlai-auth/pom.xml index 9581659e0..70d892b56 100644 --- a/youlai-auth/pom.xml +++ b/youlai-auth/pom.xml @@ -30,7 +30,7 @@ com.youlai - common-db + common-database ${youlai.version} diff --git a/youlai-auth/src/main/java/com/youlai/AuthApplication.java b/youlai-auth/src/main/java/com/youlai/auth/AuthApplication.java similarity index 94% rename from youlai-auth/src/main/java/com/youlai/AuthApplication.java rename to youlai-auth/src/main/java/com/youlai/auth/AuthApplication.java index 2608b73e9..65ae08f33 100644 --- a/youlai-auth/src/main/java/com/youlai/AuthApplication.java +++ b/youlai-auth/src/main/java/com/youlai/auth/AuthApplication.java @@ -1,4 +1,4 @@ -package com.youlai; +package com.youlai.auth; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/youlai-common/common-db/pom.xml b/youlai-common/common-database/pom.xml similarity index 95% rename from youlai-common/common-db/pom.xml rename to youlai-common/common-database/pom.xml index 8ba24e47a..400d2147b 100644 --- a/youlai-common/common-db/pom.xml +++ b/youlai-common/common-database/pom.xml @@ -9,7 +9,7 @@ 4.0.0 - common-db + common-database diff --git a/youlai-common/common-db/src/main/java/com/youlai/common/db/config/MybatisPlusConfig.java b/youlai-common/common-database/src/main/java/com/youlai/common/database/config/MybatisPlusConfig.java similarity index 90% rename from youlai-common/common-db/src/main/java/com/youlai/common/db/config/MybatisPlusConfig.java rename to youlai-common/common-database/src/main/java/com/youlai/common/database/config/MybatisPlusConfig.java index e5eced1da..1ae9a3325 100644 --- a/youlai-common/common-db/src/main/java/com/youlai/common/db/config/MybatisPlusConfig.java +++ b/youlai-common/common-database/src/main/java/com/youlai/common/database/config/MybatisPlusConfig.java @@ -1,8 +1,8 @@ -package com.youlai.common.db.config; +package com.youlai.common.database.config; import com.baomidou.mybatisplus.core.config.GlobalConfig; import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; -import com.youlai.common.db.handler.MetaHandler; +import com.youlai.common.database.handler.MetaHandler; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; diff --git a/youlai-common/common-db/src/main/java/com/youlai/common/db/handler/MetaHandler.java b/youlai-common/common-database/src/main/java/com/youlai/common/database/handler/MetaHandler.java similarity index 93% rename from youlai-common/common-db/src/main/java/com/youlai/common/db/handler/MetaHandler.java rename to youlai-common/common-database/src/main/java/com/youlai/common/database/handler/MetaHandler.java index d1a353821..2a86c98bd 100644 --- a/youlai-common/common-db/src/main/java/com/youlai/common/db/handler/MetaHandler.java +++ b/youlai-common/common-database/src/main/java/com/youlai/common/database/handler/MetaHandler.java @@ -1,4 +1,4 @@ -package com.youlai.common.db.handler; +package com.youlai.common.database.handler; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import org.apache.ibatis.reflection.MetaObject; diff --git a/youlai-common/common-database/src/main/resources/META-INF/spring.factories b/youlai-common/common-database/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..d7af623d5 --- /dev/null +++ b/youlai-common/common-database/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.youlai.common.database.config.MybatisPlusConfig diff --git a/youlai-common/common-knife4j/src/main/resources/META-INF/spring.factories b/youlai-common/common-knife4j/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..1bca0e0ed --- /dev/null +++ b/youlai-common/common-knife4j/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.youlai.common.knife4j.Knife4jConfig diff --git a/youlai-common/common-redis/src/main/resources/META-INF/spring.factories b/youlai-common/common-redis/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..d88909a35 --- /dev/null +++ b/youlai-common/common-redis/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.youlai.common.redis.RedisConfig diff --git a/youlai-common/common-web/src/main/resources/META-INF/spring.factories b/youlai-common/common-web/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..741887f88 --- /dev/null +++ b/youlai-common/common-web/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.youlai.common.web.config.WebMvcConfig,\ + com.youlai.common.web.exception.GlobalExceptionHandler diff --git a/youlai-common/pom.xml b/youlai-common/pom.xml index 7aa2332af..7931d42bc 100644 --- a/youlai-common/pom.xml +++ b/youlai-common/pom.xml @@ -18,7 +18,7 @@ common-knife4j common-redis common-web - common-db + common-database @@ -118,7 +118,7 @@ com.youlai - common-db + common-database ${youlai.version} diff --git a/youlai-gateway/src/main/java/com/youlai/GatewayApplication.java b/youlai-gateway/src/main/java/com/youlai/gateway/GatewayApplication.java similarity index 92% rename from youlai-gateway/src/main/java/com/youlai/GatewayApplication.java rename to youlai-gateway/src/main/java/com/youlai/gateway/GatewayApplication.java index a520b9c1d..55761cb8a 100644 --- a/youlai-gateway/src/main/java/com/youlai/GatewayApplication.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/GatewayApplication.java @@ -1,4 +1,4 @@ -package com.youlai; +package com.youlai.gateway; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -11,4 +11,4 @@ public class GatewayApplication { public static void main(String[] args) { SpringApplication.run(GatewayApplication.class, args); } -} \ No newline at end of file +}