报错:2月 03, 2022 5:28:12 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybits-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'org/example/dao/StudentDao.xml'. Cause: org.apache.ibatis.builder.BuilderException: Wrong namespace. Expected 'org.example.dao.StudentDao' but found 'org.example.dao.studentDao'.
代码:

spring获取Druid连接池调用init方法失败
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- CSDN专家-赖老师(软件之家) 2022-02-03 18:20关注
studentDao文件名称的student的首字母s改为大写字母S即可(StudentDao)。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用