這是什么錯(cuò)
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]" 的處理指令目標(biāo)。
2020-07-12
你把逆向生成的xml文件給刪了,重新生成就可以了。記得給生成的mapper接口加上@Repository
2019-06-26
這種情況應(yīng)該是UserPasswordDOMapper.xml里面有錯(cuò),我當(dāng)時(shí)也報(bào)這個(gè)錯(cuò)誤,后來(lái)發(fā)現(xiàn)是在xml里使用了”//“做注釋
2019-05-17
我也遇到了這樣的錯(cuò)誤,好煩,不知道怎么解決,網(wǎng)上搜了感覺(jué)都不專業(yè),難受