说明:
(1)为什么写了本篇博客?:
● 在【16:第二章:架构后端项目:12:配置mybatis;(在【imooc-news-dev-service-user】这个微服务子工程上,配置)】中,我们在【imooc-news-dev-service-user】这个微服务子工程上,在其主启动类上使用了@ComponentScan注解;
● 但是,按理说,对于Spring Boot项目,有了SpringBootApplication是可以不用再使用@ComponentScan的;自己在【(19)Spring Boot电商项目】这个项目中,就没有使用;
● 但是,虽然默认可以不用加。但是一般项目会加其他一些自定义的包,所以可以用于指定噢~