急急急,大佬們,幫我看看這個(gè)錯(cuò)?。?!
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
2018-10-17
樓上正解,肯定是mapper.xml文件粗心寫錯(cuò)了。實(shí)在找不到問題的話復(fù)制老師的試驗(yàn)。之后可能會(huì)出現(xiàn)一個(gè)日期異常。出現(xiàn)原因沒找到,應(yīng)該是bean中的date類型和數(shù)據(jù)庫中的不一致,可以先考慮把date換成string
2018-10-17
\mapper\AreaDao.xml文件有錯(cuò),解析失敗,java.io.FileNotFoundException: http://www.mybatis.org/dtd/mybatis-3-config-mapper.dtd有可能是mybatis?的dtd頭文件引入有誤,或者映射文件sql寫錯(cuò)了,你檢查一下