Spring @Autowired 调用别的包下的Bean 解决方法

需要加入注解@ComponentScan(basePackages="bean所在的包名")

example:

@SpringBootApplication
@ComponentScan(basePackages="com.,abc.")
public class TechproofApplication {
}
原文地址:https://www.cnblogs.com/bolddream/p/11090089.html