Framework/Spring3 [Spring Cloud Gateway] Gateway와 SSE 사용시 데이터 수신 요약 1. 서버를 분리하면서 SSE를 이용한 실시간 알림 수신 기능에 문제 발생 2. 요청도 정상적으로 갔고, 실제 서버에서 처리도 했지만, 응답만 못받는 채로 타임아웃/재연결 무한반복 3. Spring Cloud Gateway에서 CORS 관련 문제로 응답을 보내주지 않았음 4. application.yml 설정으로 간단히 해결 개요 기존 구현 코드 해당 프로젝트 초기에는 Front-End와 Back-End 분리 없이 하나의 서버에서 모든 과정을 수행했었다. 기능이 점점 추가되면서 각 기능별로 분리하게 됐다. 위 아키텍처로 가기 전에 하나씩 분리하면서 테스트를 통해 기존 기능이 정상적으로 수행하는지 확인했는데, 그 중 실시간 알림 기능이 문제였다. 기능 중 한가지로 Server Sent Event(SS.. Framework/Spring 2023. 1. 2. [Spring JPA, HikariCP] SQLTransientConnectionException 트러블슈팅 환경 Java : 11 Spring Boot : 2.7.0 Spring Boot Data JPA : 2.7.0 Hibernate : 5.6.9 Final HikariCP : 4.0.3 최초 발견 서비스 시작 이후 20페이지 정도 이동하다 보니 해당 Exception이 뜨면서 DB에 접근할 수 없게 되었고, 당연히 서비스도 멈추게 되었습니다. SQL Error: 0, SQLState: null HikariPool-1 - Connection is not available, request timed out after 30000ms. 원인 분석 AOP 문제?(NO) 관련 없는 미숙한 신입 개발자의 코드이니 넘어가셔도 좋습니다. 콘솔 로그에도 나와있듯이 요청이 들어오고 난 뒤 30초간 어떠한 Connection도.. Framework/Spring 2022. 9. 13. [Spring Security] @AuthenticationPrincipal https://spring.io/guides/topicals/spring-security-architecture/ Spring Security Architecture this topical is designed to be read and comprehended in under an hour, it provides broad coverage of a topic that is possibly nuanced or requires deeper understanding than you would get from a getting started guide spring.io 공식문서를 참고하여 작성했습니다. @AuthenticationPrincipal @RequestMapping("/foo") public Strin.. Framework/Spring 2022. 7. 11. 이전 1 다음