这是什么错

来源:3-1 使用SpringMVC方式开发用户信息

慕慕0563197

2019-04-24 20:52

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'app': Unsatisfied dependency expressed through field 'userDOMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDOMapper' defined in file [E:\ideawork\newdongsheng\trunk\miaosha\target\classes\com\miaoshaproject\dao\UserDOMapper.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 [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\ideawork\newdongsheng\trunk\miaosha\target\classes\mapping\UserPasswordDOMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 7; 不允许有匹配 "[xX][mM][lL]" 的处理指令目标。

写回答 关注

3回答

  • KAI666666
    2020-07-12 18:12:23

    你把逆向生成的xml文件给删了,重新生成就可以了。记得给生成的mapper接口加上@Repository

  • 玥光宝盒
    2019-06-26 15:29:27

    这种情况应该是UserPasswordDOMapper.xml里面有错,我当时也报这个错误,后来发现是在xml里使用了”//“做注释

  • 孤独流浪者456
    2019-05-17 17:57:14

    我也遇到了这样的错误,好烦,不知道怎么解决,网上搜了感觉都不专业,难受

SpringBoot构建电商基础秒杀项目

应用SpringBoot快速搭建拥有用户、商品、交易及秒杀活动的电商秒杀应用。

49065 学习 · 954 问题

查看课程

相似问题