⚡ admin-core自动装配,简化使用配置
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.hccake.ballcat.admin.UpmsAutoConfiguration
|
||||
Reference in New Issue
Block a user