急急急,大佬们,帮我看看这个错!!!

来源:3-6 dao层开发

Sanmin

2018-10-15 13:57

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'areaDao' defined in file [F:\springBootMybatis\target\classes\com\imooc\demo\dao\AreaDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/imooc/demo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\springBootMybatis\target\classes\mapper\AreaDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: java.io.FileNotFoundException: http://www.mybatis.org/dtd/mybatis-3-config-mapper.dtd

写回答 关注

2回答

  • 三月GCS
    2018-10-17 17:18:28

    楼上正解,肯定是mapper.xml文件粗心写错了。实在找不到问题的话复制老师的试验。之后可能会出现一个日期异常。出现原因没找到,应该是bean中的date类型和数据库中的不一致,可以先考虑把date换成string

  • 邙星魂
    2018-10-17 12:56:07

    \mapper\AreaDao.xml文件有错,解析失败,java.io.FileNotFoundException: http://www.mybatis.org/dtd/mybatis-3-config-mapper.dtd有可能是mybatis 的dtd头文件引入有误,或者映射文件sql写错了,你检查一下

SpringBoot+MyBatis搭建迷你小程序

SpringBoot+MyBatis搭建小程序后台

91500 学习 · 621 问题

查看课程

相似问题