refactor(all): 简化代码 componentScan 注解的使用
This commit is contained in:
@@ -6,8 +6,6 @@ import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.ComponentScans;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
|
||||
/**
|
||||
@@ -17,10 +15,13 @@ import org.springframework.retry.annotation.EnableRetry;
|
||||
* @date 2023-04-30
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(exclude = {GsonAutoConfiguration.class, DataSourceAutoConfiguration.class})
|
||||
@ComponentScans({
|
||||
@ComponentScan("com.lanyuanxiaoyao.service")
|
||||
})
|
||||
@SpringBootApplication(
|
||||
scanBasePackages = {"com.lanyuanxiaoyao.service"},
|
||||
exclude = {
|
||||
GsonAutoConfiguration.class,
|
||||
DataSourceAutoConfiguration.class
|
||||
}
|
||||
)
|
||||
@EnableConfigurationProperties
|
||||
@EnableRetry
|
||||
public class FlinkQueryApplication {
|
||||
|
||||
Reference in New Issue
Block a user