多模块:The injection point has the following annotations: @org.springframework.beans.factory.annotatio
1、场景springboot多模块引用的时候会出现没有扫描到所在的包,其实也会是mavn引入了2、报错信息3、问题解决:Autowired 根据类型去spring容器找,找不到那个类,就会报错!只需要在 springboot启动类上添加扫描的包就可以了@ComponentScan(basePackages= "com.xxx.service")@MapperScan("com.xxx.mapper
·
1、场景springboot多模块引用的时候会出现没有扫描到所在的包,其实也会是mavn引入了
2、报错信息
3、问题解决:
Autowired 根据类型去spring容器找,找不到那个类,就会报错!
只需要在 springboot启动类上添加扫描的包就可以了
@ComponentScan(basePackages = "com.xxx.service")
@MapperScan("com.xxx.mapper")
更多推荐
已为社区贡献1条内容
所有评论(0)