MyBatis에서 Mapper 파일 안에서 CRUD를 나눠서 관리하는 이유


1. 가독성 향상

<!-- INSERT -->
<insert id="insertUser">...</insert>

<!-- SELECT -->
<select id="selectUserById">...</select>

<!-- UPDATE -->
<update id="updateUserEmail">...</update>

<!-- DELETE -->
<delete id="deleteUserById">...</delete>

2. 개발/디버깅 편의


3. 의도 분리 (Separation of Concerns)