简介
@DataJpaTest requires TestEntityManager + flush()/clear() before assertions — without this, tests read from Hibernate L1 cache and pass falsely. Read before writing any JPA test. Triggers: @DataJpaTest, JpaRepository, TestEntityManager, @ServiceConnection, Testcontainers, @Modifying, Hibernate 6/7, @AutoConfigureTestDatabase, flush and clear in tests, @Transactional in tests, jakarta.persistence.EntityManager.
安装
这个 Skill 由 spring-ai-community 发布。我们暂未抓到它的正文,但可以按文件清单直接打包下载。
① 解压下载的压缩包。里面是这个 Skill 的文件与说明。
② 按它附带的说明放进你的 Agent。Claude Code、Codex、TypingMind 等客户端的安装位置各不相同,以包内说明为准。
③ 调用前先看清它申请的权限。技能通常会读写文件或调用外部命令,请自行确认数据范围。
文件来自原始发布页的公开下载地址,微算力只做中转与加速;版权与许可以原文为准。
原始仓库
作者的项目地址:https://github.com/spring-ai-community/spring-testing-skills