http://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure
mybatis-spring-boot-autoconfigure – Introduction
Introduction What is MyBatis-Spring-Boot-Starter? The MyBatis-Spring-Boot-Starter help you build quickly MyBatis applications on top of the Spring Boot. By using this module you will achieve: Build standalone applications Reduce the boilerplate to almost z
mybatis.org
위 링크의 Quick Setup 부분을 보자.
1. Datasource를 찾는다
2. 그를 SqlSessionFactoryBean의 인풋으로 주어 SqlSessionFactory를 만들고 등록한다.
3. SqlSessionFactory를 이용하여 SqlSessionTemplate를 만들고 등록한다.
4. 매퍼를 찾아 SqlSessionTemplate에 연결하고 그를 Spring context에 등록하여 bean 주입이 될 수 있도록 자동설정한다.
따라서 mybatis-spring-boot-starter 를 사용한다면 datasource 설정 외에 sqlsession 부분 설정은 따로 필요하지 않는다.
'Spring > 기타' 카테고리의 다른 글
[Spring boot] swagger 기본 설정 (0) | 2022.05.29 |
---|---|
[JPA/hibernate] Parameter value [\] did not match expected type [~] 오류 해결방법 (0) | 2022.05.15 |
Error executing DDL 오류 해결방법 (0) | 2022.02.07 |
gradle 전체 테스트 수행 시 test events were not received 문구 (0) | 2022.02.06 |
IntelliJ 프로젝트 JDK 버전 변경하기 (0) | 2022.01.13 |