SpringBootApplication 包括的注解
@SpringBootConfiguration
組合了 @Configuration 注解,實(shí)現(xiàn)配置文件的功能。
@EnableAutoConfiguration
打開自動(dòng)配置的功能,也可以關(guān)閉某個(gè)自動(dòng)配置的選項(xiàng),
例如:java 如關(guān)閉數(shù)據(jù)源自動(dòng)配置功能: @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })。文章來源:http://www.zghlxwxcb.cn/news/detail-686820.html
@ComponentScan
Spring組件掃描。文章來源地址http://www.zghlxwxcb.cn/news/detail-686820.html
到了這里,關(guān)于Spring Boot 的核心注解SpringBootApplication的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!