mybatis
![[Spring] MyBatis와 스프링 연동하기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FtEjPy%2FbtqFrD5RB4k%2F3wVnaBW3cunZIUP6oCypP1%2Fimg.png)
[Spring] MyBatis와 스프링 연동하기
MyBatis는 기존의 sql을 그대로 활용할 수 있다는 장점이 있고, 진입장벽이 낮은 편이어서 JDBC의 대안으로 많이 사용한다. 스프링에서는 mybatis-spring이라는 라이브러리를 통해 쉽게 연동 작업을 처리할 수 있다. Mybatis와 mybatis-spring을 사용하려면 추가적인 라이브러리가 필요하다. pom.xml을 수정해주자 spring-tx/spring-jdbc : 스프링에서 데이터베이스와 트랜잭션 처리를 위해 필요한 라이브러리 (없으면 에러가 나니 꼭 설치해주자) mybatis/mybatis-spring : mybatis와 스프링 연동용 라이브러리 MyBatis에서 가장 중요한 핵심은 SQLSessionFactory와 SQLSession 객체이다. SQLSessionFactory는 ..