나를 위해 작성 ^-------^
1. pom.xml
org.springframework-version 5.2.3.RELEASE 로 변경
org.aspectj-version 1.9.5 로 변경
org.slf4j-version 1.7.30 로 변경
hibernate
서버 유효성 검사
jackson databind
JDBC
MyBatis
Oracle/MySql
(Oracle은 12c 버전)
2. web.xml
한국어 사용을 위한 문자 인코딩 방식 변경
3. root-context.xml
네임스페이스 beans, context, jdbc, mybatis-spring, tx 선택
MyBatis 연동을 위한 bean 등록 및 의존관계 설정
Data source bean
Oracle/Mysql
MyBatis SqlSessionFactory bean
MyBatis Spring SqlSessionTemplate bean
트랜잭션 관리 객체
transaction annotation
4. mybatis-config.xml
src/main/resources에 mybatis-config.xml 파일 생성
typeAliase: 매핑 파일에서 지정하는 자바클래스에 대한 별칭을 할당
앞으로 사용할 Mapper 파일에서 parameterType 이나 resultType에 사용하는
클래스 이름에 typeAliases에 등록한 이름을 생략할 수 있다.
5. mapper.xml 작성
src/main/resources 에 mappers 폴더 - Mapper.xml 파일 생성
namespace 에는 Mapper.xml 의 경로