springboot指定注解扫描范围
生活随笔
收集整理的這篇文章主要介紹了
springboot指定注解扫描范围
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
springboot注解掃描范圍是由@ComponentScan指定的;
默認情況下為啟動程序所在目錄及其子包;
如果需要指定掃描路徑,在啟動程序中添加修改
@ComponentScan(basePackages={"org.jstudio.a","org.jstudio.b"}) @SpringBootApplication public class xxxApplication {public static void main(String[] args) {SpringApplication.run(xxxApplication.class, args);} }?
轉載于:https://www.cnblogs.com/zsg88/p/11320239.html
總結
以上是生活随笔為你收集整理的springboot指定注解扫描范围的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 判断一个java对象中的属性是否都未赋值
- 下一篇: Adobe flash builder