问答详情
源自:3-6 dao层开发

第一个测试的时候报这个错误,有知道怎么解决的吗?

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.dtdhttps://img.mukewang.com/5bc4075400018df310070435.jpghttps://img3.mukewang.com/5bc407650001e47609570415.jpg

提问者:Sanmin 2018-10-15 11:02

个回答

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

    你的mapper.xml文件有的地方写错了。仔细检查,