Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.


项目构建正常,启动和Debug报以下错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-12-14 09:49:32.038 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.


Action:

Consider defining a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:56886', transport: 'socket'

Process finished with exit code 1

 

解决办法:

启动类上加上

@MapperScan({ "com.tianyan.bbc.dao"})


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM