Archive


Category: java

  • How Spring Boot Injects `SqlSessionTemplate` for `@Mapper` Interfaces

    In Spring Boot with MyBatis, the @Mapper annotation is used to mark an interface as a MyBatis Mapper. Spring Boot automatically injects SqlSessionTemplate behind the scenes to enable SQL execution for these mapper interfaces. How Spring Boot Injects SqlSessionTemplate for @Mapper Interfaces Spring Boot and MyBatis integrate through MyBatis-Spring-Boot-Starter, which: Scans for @Mapper interfaces and […]