Attribute “resource“ must be declared for element type “mapper“.
报错的直接原因:mybatis的映射文件和核心配置文件的约束信息是不同的!误把映射文件的约束信息直接复制到了核心配置文件中。映射文件:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/myba