其主要原因在于spring boot只扫描启动类
或者将@SpringBootApplication放最外层
@SpringBootApplication注解在的包
解决方法:
在domain中添加@Component后
在@SpringBootApplication的下面加上注解@ComponentScan(basePackages = {"com.xxx"})
其主要原因在于spring boot只扫描启动类
或者将@SpringBootApplication放最外层
@SpringBootApplication注解在的包
解决方法:
在domain中添加@Component后
在@SpringBootApplication的下面加上注解@ComponentScan(basePackages = {"com.xxx"})