feat:公共模块添加spring.factories实现自动加载项关配置类

This commit is contained in:
haoxr 2020-11-15 15:08:17 +08:00
parent b5ca430125
commit 411f4cdac2
12 changed files with 20 additions and 11 deletions

View File

@ -37,7 +37,7 @@
<dependency> <dependency>
<groupId>com.youlai</groupId> <groupId>com.youlai</groupId>
<artifactId>common-db</artifactId> <artifactId>common-database</artifactId>
<version>${youlai.version}</version> <version>${youlai.version}</version>
</dependency> </dependency>

View File

@ -30,7 +30,7 @@
<dependency> <dependency>
<groupId>com.youlai</groupId> <groupId>com.youlai</groupId>
<artifactId>common-db</artifactId> <artifactId>common-database</artifactId>
<version>${youlai.version}</version> <version>${youlai.version}</version>
</dependency> </dependency>

View File

@ -1,4 +1,4 @@
package com.youlai; package com.youlai.auth;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>common-db</artifactId> <artifactId>common-database</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -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.core.config.GlobalConfig;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;

View File

@ -1,4 +1,4 @@
package com.youlai.common.db.handler; package com.youlai.common.database.handler;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject; import org.apache.ibatis.reflection.MetaObject;

View File

@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.youlai.common.database.config.MybatisPlusConfig

View File

@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.youlai.common.knife4j.Knife4jConfig

View File

@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.youlai.common.redis.RedisConfig

View File

@ -0,0 +1,3 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.youlai.common.web.config.WebMvcConfig,\
com.youlai.common.web.exception.GlobalExceptionHandler

View File

@ -18,7 +18,7 @@
<module>common-knife4j</module> <module>common-knife4j</module>
<module>common-redis</module> <module>common-redis</module>
<module>common-web</module> <module>common-web</module>
<module>common-db</module> <module>common-database</module>
</modules> </modules>
<properties> <properties>
@ -118,7 +118,7 @@
<dependency> <dependency>
<groupId>com.youlai</groupId> <groupId>com.youlai</groupId>
<artifactId>common-db</artifactId> <artifactId>common-database</artifactId>
<version>${youlai.version}</version> <version>${youlai.version}</version>
</dependency> </dependency>

View File

@ -1,4 +1,4 @@
package com.youlai; package com.youlai.gateway;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -11,4 +11,4 @@ public class GatewayApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(GatewayApplication.class, args); SpringApplication.run(GatewayApplication.class, args);
} }
} }