<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mappernamespace="com.blake.demo.mapper.UserMapper"> <selectid="findByName"resultType="com.blake.demo.entity.User"> SELECT * FROM USER WHERE NAME = #{name} </select> <insertid="insert"> INSERT INTO USER(NAME, AGE) VALUES(#{name}, #{age}) </insert></mapper>