뭐든지시작이반이다
Dream Future
뭐든지시작이반이다
  • 분류 전체보기
    • Spring
      • 개념
      • 기타
    • Java
    • Algorithm
      • 알고리즘 정리
    • DB
      • Postgresql
    • 트러블슈팅
    • Git & Github
    • V&V
    • EFK
    • 북스터디
    • 기타

인기 글

최근 댓글

전체 방문자
오늘
어제

블로그 메뉴

  • 홈
  • 태그
  • 방명록

태그

  • docker
  • gitignore
  • auditing
  • spring
  • springboot
  • fluentd
  • mybatis
  • Kibana
  • Kotlin
  • gradle
  • springbot
  • requestmapping
  • spring-boot
  • Controller
  • Hibernate
  • 대규모서비스
  • multimodule
  • lombok
  • 트러블슈팅
  • efk
  • SelectionSort
  • git
  • dirtyChecking
  • SqlSessionFactory
  • 알고리즘
  • JPA
  • 파티셔닝
  • ambiguous오류
  • github
  • sqlSessionTemplate
hELLO · Designed By 정상우.
뭐든지시작이반이다

Dream Future

Spring/기타

[Spring boot] mybatis 설정 sqlsession 관련 설정이 필요없는 이유

2022. 5. 9. 21:13

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
    'Spring/기타' 카테고리의 다른 글
    • [Spring boot] swagger 기본 설정
    • [JPA/hibernate] Parameter value [\] did not match expected type [~] 오류 해결방법
    • Error executing DDL 오류 해결방법
    • gradle 전체 테스트 수행 시 test events were not received 문구
    뭐든지시작이반이다
    뭐든지시작이반이다
    기록장입니다.

    티스토리툴바