Notice
Recent Posts
Recent Comments
Link
J.one_DevNote
{Spring Boot} - MyBatis사용법 본문
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
'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