본문 바로가기

[Mybatis] 쿼리 예쁘게 출력, DB에 저장하기 1. maven dependency 추가12345 org.lazyluke log4jdbc-remix 0.2.7cs 2. dataSource 설정: dataSource를 net.sf.log4jdbc.Log4jdbcProxyDataSource클래스를 사용한 빈으로 교체12345678910111213141516 Colored by Color Scriptercs 3. log4j 설정: result는 ERROR 레벨에서만 확인하도록 수정1234567891011 Colored by Color Scriptercs - #%p debug, info, warn, error, fatal 등의 priority 가 출력된다. #%m 로그내용이 출력됩니다 #%d 로깅 이벤트가 발생한 시간을 기록합니다.# 포맷은 %d{HH:mm:.. 더보기
17/05/25 # spring interceptor의 preHandle, postHandlepreHandle은 controller 작업 전 수행postHandle은 controller 작업 후 수행 # controller단에서 exception을 throw할 경우(1) dispatcher에서 처리하게 된다.저는 다음과 같이 exception resolver를 등록하여 Controller 에서 try catch로 예외를 잡지 않고, DispatcherServlet으로 모두 던집니다. common/error/businessLogicErrorcommon/error/runtimeErrorcommon/error/defaultError 2013년 12월 12일 오전 9:47, Shin-Hyeong Song 님의 말: (2) @E.. 더보기
17/05/24 # classpath의 path?(1) src/main/resources 폴더에 해당(2) build 시 /WEB-INF/classes #이 가능한 이유.properties가 붙으면 빌드시 messages.properties => messages/properties 로 생성해주는듯? # spring message tag1) jsp단에서 사용2) 속성들arguments :: 부가적인 인자를 넘겨줄 수 있다. 콤마로 구분된 문자열, 객체 배열, 객체 하나를 넘길 수 있다. argumentSeparator :: 넘겨줄 인자들의 구분자를 설정한다. 기본값은 콤마 code :: 룩업할 메시지의 키를 지정해줌. 지정하지 않으면 text에 입력한 값을 출력함. htmlEscape :: 기본값 false. html 기.. 더보기