$E = mc^2$
Error = more code^2
MyBatis란?
SQL Mapping Framwork
Easy & Simple 프레임워크로 자바코드를 SQL(XML)로 변환해주는 프레임워크다.
SqlSessionFactoryBean과 sqlSesstionTemplate
- SqlSessionFactory - SqlSession을 생성해서 제공
- SqlSession - Sql명령을 수행하는데 필요한 메서드 제공
- SqlSessionFactoryBean - SqlSessionFactory를 Spring에서 사용하기 위한 빈
- SqlSessionTemplate - SqlSession과 동일하지만 Thread Safe함
- Thread Safe - 멀티 쓰레드에서 접근 시 안정성을 제공하는 기능

각 타입의 별명역할을 하는 리터럴(alias)은 대소문자를 구별하지 않으므로 조바심내지 않아도 된다.
DTO란?
Data Transfer Object - 계층간의 데이터를 주고 받기 위해 사용되는 객체

가급적 null을 받을 수 있게 primitive type이 아니라 wrapper 클래스를 사용하는게 좋다.
계층의 분리