本文主要是介绍Description: A component required a bean of type ‘com.gxy.dao.UserDao‘ that could not be found. A,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Description:
A component required a bean of type ‘com.gxy.dao.UserDao’ that could not be found.
Action:
Consider defining a bean of type ‘com.gxy.dao.UserDao’ in your configuration.
1、Dao层中添加@mapper
2、.xml文件selece属性值
3、mapper-locations: classpath:mapper/*.xml #指定mapper的配置文件的路径是mapper文件夹下的所有 xml文件。
4、@SpringBootApplication
@MapperScan(“com.gxy.dao.UserDao”)
这篇关于Description: A component required a bean of type ‘com.gxy.dao.UserDao‘ that could not be found. A的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!