How to Unit Test Mappers in Spring Boot + MyBatis - Why @MybatisTest Doesn't Exist and Alternative Configurations with H2/Testcontainers
MyBatis Mapper has no dedicated slice test equivalent to @DataJpaTest. This article explains why, based on the coupling with SqlSession, and compares four patterns—minimal @SpringBootTest configuration, lightweight Java Config, H2, and Testcontainers—with a comparison table and working code.