在MyBatis中,声明xml文件时候,为什么会报Element type "mapper"必须被声明,还有There is 1 error in 那个网站。看图片
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace=".........">
</mapper>
按照这个,是Config 不是Mapper。