例如:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-09-30 10:26:31.547 ERROR 49280 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field tUserMapper in com.zxh.Service.Impl.UserServiceImpl required a bean of type 'com.zxh.Dao.TUserMapper' that could not be found.
Action:
Consider defining a bean of type 'com.zxh.Dao.TUserMapper' in your configuration.
需要在启动类里面加入
@MapperScan("com.zxh.Dao")
com.zxh.Dao为你项目Mapper接口文件夹路径或者项目路径
我的项目结构