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

这个bug怎么改?第一次用Idea和第一次写boot


UnsatisfiedDependencyException: Error creating bean with name 'areaDao' defined in file [C:\Users\37991\IdeaProjects\test\mvndemo\target\classes\com\mvn\mvndemo\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/mvn/mvndemo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 6; 不允许有匹配 "[xX][mM][lL]" 的处理指令目标。


 Error creating bean with name 'areaDao' defined in file [C:\Users\37991\IdeaProjects\test\mvndemo\target\classes\com\mvn\mvndemo\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/mvn/mvndemo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 6; 不允许有匹配 "[xX][mM][lL]" 的处理指令目标。


提问者:qq_贱字如雾_0 2019-03-15 09:56

个回答

  • Tawn
    2019-04-09 00:30:13

    请问楼主找到解决方案了吗?

  • 慕丝0384782
    2019-03-15 15:19:18

    作者的这个教程比较偏向spring,配置会比较繁琐,你要学springboot的话可以去看看廖师兄的springboot进阶。

  • 慕丝0384782
    2019-03-15 15:16:38

    那可能就是dao层的配置有问题了,你认真检查一遍试试

  • 慕丝0384782
    2019-03-15 14:27:16

    没有找到areDao,引用dao层的时候有没有加@Autowired注解呀