@ComponentScan

组件扫描。让spring Boot扫描到Configuration类并把它加入到程序上下文。@ComponentScan注解默认就会装配标识了@Controller,@Service,@Repository,@Component注解的类到spring容器中。

一个小小后端的爬行痕迹
原文地址:https://www.cnblogs.com/heikedeblack/p/14329138.html