Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
Total
관리 메뉴

J.one_DevNote

{Spring Boot} - MyBatis사용법 본문

Spring Boot

{Spring Boot} - MyBatis사용법

중엔 2022. 6. 20. 16:47

1. SqlSessionTemplate 방식 (Mybatis 3.0 이전)

Mybatis - String Substitution

가장 대중화되어있는 방식

xml 파일에 작성된 쿼리을 통해 실행시킨다

Controller

Service

DAO

Mapper

Xml

2. Mapper Interface 방식 (Mybatis 3.0 이후)

Mybatis - String Substitution

3이상 버전부터 mapper.xml 대신 interface 클래스의 Annotation을 통해 SQL을 사용할 수 있다.

controller

service

mapper

 

 

참조 : https://mybatis.org/mybatis-3/ko/index.html

'Spring Boot' 카테고리의 다른 글

{Spring Boot} - Maven과 Gradle  (0) 2022.06.27
{Spring Boot} - api 연결하기  (0) 2022.06.22
{Spring Boot} - 외부 세팅 application.properties  (0) 2022.06.20
{Spring Boot} - Mybatis 시작하기  (0) 2022.06.20
{Mybatis} - Mybatis란  (0) 2022.06.20
Comments