Spring工程里,经常会遇到Could not autowire. No beans of 'xx' type found 的错误提示,程序的编译和运行都是没有问题的,错误提示并不会产生影响编译。强迫症受不了,,,
1.idea工具本身问题,MapperScannerConfigurer未能去正确识别Dao层对应的package,
解决方法: File--Settings---Editor---Inspections---Spring-Spring Core--code--Autowiring for Bean Class,级别修改为warning。
2.Service未能正确引用