SpringBoot2 SpringBoot - http request와 response 로깅하기 웹 어플리케이션을 운영하다 보면 http의 request와 response 로그가 필요한 경우가 있다. 기본적으로 SpringBoot 에서는 http의 request, response 를 로깅하지 않으므로 개발자는 추가로 설정을 해줘야 한다. 먼저, Spring MVC Request Lifecycle 을 이해해야 함으로 아래 그림을 참고 하자 본 글에서는 Filter와 HandlerInterceptor를 사용하여 로깅을 할 예정이다. Http logging 방법은 2가지가 있다. Custom Request, Response 로깅 1. RequestWrapper와 ResponseWrapper 클래스를 만든다. Wrapper를 만드는 이유는 HttpServletRequest 의 InputStream 은 오직.. 2020. 8. 5. Spring Boot & HikariCP 튜닝 Spring Boot 2.0부터 HikariCP로 Default Connection Pool로 변경되었습니다. 아래 그림을 보면 바뀐 이유를 알수가 있다. (빠르다) GitHub Page https://github.com/brettwooldridge/HikariCP Spring Boot 를 사용하면, Gradle or Maven에 별도로 설정할 필요는 없다. spring-boot-starter-data-jpa 에 dependency에 걸려 Default로 hikariCP가 설정된다. application.yml에서 hikariCP datasource 설정을 해보겠다. spring: datasource: type: com.zaxxer.hikari.HikariDataSource url: jdbc:mysql:.. 2020. 3. 15. 이전 1 다음