学习spring框架时遇到一个问题。
记录一个错误:
摘出最主要的提示:
Error creating bean with name 'sqlSessionFactory' defined in class path resource [application-config.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/yiwensi/wuye/mapper/paymentMapper (wrong name: com/yiwensi/wuye/mapper/PaymentMapper)
主要问题Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed;在创建bean时,调用初始化方法失败。从而引出后面集中嵌套的错误。
定位到最终代码Cannot find class: org.example.domain.Student不能够找到这个文件。下面是文件路径
报错原因:mapper接口名字和mapper,xml 名字没对上导致的错误 文章来源:https://www.toymoban.com/news/detail-735249.html
文章来源地址https://www.toymoban.com/news/detail-735249.html
到了这里,关于Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource [application-config的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!