어떤 요청이 *.gd로 끝나면 내가 관여할게

어떤 요청에 대해서 처리를 담당할 클래스를 결정하는 일을 전담하는 클래스(or 인터페이스)가 있어야 하지 않을까?
화면 없어도 개발할 수 있다.
화면이 없는 상태에서도 단위테스트 할 수 있다.
프레임워크
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection(URL, "scott", "tiger"); //물리적인 거리가 있는 서버와 연결통로
PreparedStatement pstmt = con.preparedStatement();
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
map<String, Object> rmap = new HashMap<>(); - 이것을 계속 반복해야한다.
}
1번과 2번이 반복된다 -> 둘 반복을 대신하는 SqlSessionFactory - MapperConfig.xml(드라이버, ip, port, orcl11, scott, tiger + 물리적인 위치(notice.xml, test.xml -> DML(id==method name, )
3번(insert, update, delete, select)
의존관계에 있는 클래스(혹은 인터페이스)들이 보통 메소드 호출로 객체를 주입한다
SqlSession sqlSession = sqlSessionFactory.openSession(); //메소드 호출로 객체를 주입받는다(고급)
sqlSession.commit()
sqlSession.rollback()
sqlSession.selectOne{Object - 1건 - VO, Map - String}("id")
sqlSession.selectMap{Map - 1건} : 우선 순위가 낮다
<select resultMap="map" parameterMap="map">
List<Map> = sqlSession.selectList - n건
while(rs.nex()){
//3번 반복 - 1번 - Map, Map, Map
}
open ... cursor ... fetch ... close()
4번(select만) - while문 - 생략가능하다 왜냐하면
<select resultMap="map" parameterMap="map">M : margin - 외부여백
P : padding - 안쪽 여백
t : top
b : bottom
l : left
r : right
x : x축 -> left, right
y : y축 -> top, bottom
0, 1, 2, 3, 4, 5, auto
1 : .25rem(font-size가 16px이면 4px)
2 : 0.5rem
3 : 1rem
4 : 1.5rem
5 : 3rem