refactor(all): 简化代码 componentScan 注解的使用
This commit is contained in:
@@ -7,8 +7,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
||||
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;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@@ -19,11 +17,13 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
* @date 2023-04-24
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(exclude = {GsonAutoConfiguration.class})
|
||||
@ComponentScans({
|
||||
@ComponentScan("com.lanyuanxiaoyao.service"),
|
||||
@ComponentScan("com.eshore.odcp.hudi.connector.utils.database"),
|
||||
})
|
||||
@SpringBootApplication(
|
||||
scanBasePackages = {
|
||||
"com.lanyuanxiaoyao.service",
|
||||
"com.eshore.odcp.hudi.connector.utils.database"
|
||||
},
|
||||
exclude = {GsonAutoConfiguration.class}
|
||||
)
|
||||
@EnableConfigurationProperties
|
||||
@EnableRetry
|
||||
@EnableScheduling
|
||||
|
||||
Reference in New Issue
Block a user