<?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">
<!--namespace为对应的mapper类的全路径名-->
<mapper namespace="com.cenobitor.mapper.PicMapper">
<!-- 添加 -->
<!-- id为对应的方法名, parameterType为入参的全路径名-->
<insert parameterType = "com.cenobitor.pojo.Pic">
insert into
pic(name,url)
values
(#{name},#{url});
</insert>
</mapper>
6、项目的目录结构
7、效果