Mybatis的二级缓存
1.在mybatis的配置文件中加:
<settings>
<setting name="cacheEnabled" value="true"></setting>
</settings>
2.在mapper.xml中的namespace中加入
<cache/>
3.对这个对象实现序列化
eg:
public class Student implement Serializable{
}