安全, 新闻 由 Mybatis 源码畅谈软件设计(八):从根上理解 Mybatis 二级缓存 2025年6月23日 / 1. 验证二级缓存 在上一篇帖子中的 User 和 Department 实体类依然要用,这里就不再赘述了,要启用二级缓存,需要在 Mapper.xml 文件中指定 cache标签,如下: UserMapper.xml <select id="findAll" resultTyp