<?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">
<mapper namespace="stud">
<!-- 或
<mapper namespace="cn.mapper.StudMapper">
-->
<!-- 打开二级缓存 -->
<cache readOnly="true" eviction="FIFO" size="1000" flushInterval="100000"></cache>
<!-- 打开mybatis-ehcache二级缓存,需要在根目录下创建ehcache.xml
<cache type="org.mybatis.caches.ehcache.EhcacheCache" readOnly="true" eviction="FIFO" size="1000" flushInterval="100000"></cache>
-->
<select id="all" resultType="map" parameterType="java.lang.String">
select * from studs where stud_id=#{kkkk}
</select>
<insert id="save" parameterType="cn.test.Stud">
insert into studs(stud_id,stud_name,stud_age)
values(#{id},#{name},#{age})
</insert>
</mapper>