学习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 名字没对上导致的错误 

 

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐