org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybati-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/xy/dao/BookMapper.xml
2条回答 默认 最新
离人散 2021-10-18 10:40关注这个错误提示是sqlSessionFactory sql配置出错,所以调用init失败,因为找不到 com/xy/dao/BookMapper.xml 这个文件。你可以检查一下你连接数据库的代码有没有问题。
本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用