处理指令必须以目标名称开头。
来源:2-6 逐层完成SSM的各项配置
Sulong
2019-06-01
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\javaweb\oto\target\classes\mapper\AreaDao.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 3; 处理指令必须以目标名称开头。
写回答
1回答
-
翔仔
2019-06-02
同学好,应该是AreaDao.xml里面有些标签或者语法写错了,请与视频仔细检查下,出现错误后导致解析不了。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.imooc.o2o.dao.AreaDao"> <select id="queryArea" resultType="com.imooc.o2o.entity.Area"> SELECT area_id,area_name,priority,create_time,last_edit_time FROM tb_area ORDER BY priority DESC </select> </mapper>
022019-06-03
相似问题