admin-core自动装配,简化使用配置

This commit is contained in:
b2baccline
2020-05-25 21:10:32 +08:00
parent 06ab3a4d09
commit 057cd3ace8
3 changed files with 22 additions and 4 deletions

View File

@@ -8,7 +8,6 @@ import com.hccake.simpleredis.EnableSimpleCache;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
/**
* @author Hccake
@@ -18,9 +17,8 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
@EnableSwagger2Aggregator
@EnableAccessLog
@EnableOperationLog
@ServletComponentScan("com.hccake.ballcat.admin.oauth.filter")
@SpringBootApplication(scanBasePackages = {"com.hccake.ballcat.admin", "com.your.packages.admin"})
@MapperScan(basePackages = {"com.hccake.ballcat.**.mapper", "com.your.packages.**.mapper"})
@MapperScan("com.your.packages.**.mapper")
@SpringBootApplication
public class AdminApplication {
public static void main(String[] args) {

View File

@@ -0,0 +1,18 @@
package com.hccake.ballcat.admin;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* @author Hccake
* @version 1.0
* @date 2020/5/25 21:01
*/
@MapperScan("com.hccake.ballcat.**.mapper")
@ComponentScan
@ServletComponentScan("com.hccake.ballcat.admin.oauth.filter")
@Configuration
public class UpmsAutoConfiguration {
}

View File

@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.hccake.ballcat.admin.UpmsAutoConfiguration