본문 바로가기
IT 개발, develop/java

[spring-boot] MyBatis-Spring-Boot-Starter

by newly everyday 2023. 10. 16.

mybatis-spring-boot-starter 를 사용해야 할때, 

어떤 버전을 사용해야 할까? 고민이 됩니다.

 

다음 사이트에 보면 버전 mapping  정리가 잘 되어 있습니다. 

https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/

 

mybatis-spring-boot-autoconfigure – Introduction

Introduction Translations Users can read about MyBatis-Spring-Boot-Starter in the following translations: 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 t

mybatis.org

 

저 같은 경우에는

java 1.8 이기에 

spring-boot 2.7 을 사용하고, 

이에 맞춰서 mybatis-spring-boot-starter   을 2.3 으로 셋팅해서 사용하고 있습니다. 

 

다음과 같이 build.gradle 을 설정하였습니다. 

dependencies {

implementation 'org.springframework.boot:spring-boot-starter-web'

implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0'

compileOnly 'org.projectlombok:lombok'

runtimeOnly 'mysql:mysql-connector-java:8.0.25'

annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.springframework.boot:spring-boot-starter-test'

}

댓글