개발/Spring
-
[Spring Security] OAuth2 client의 StackOverflowException개발/Spring 2024. 4. 16. 10:47
대학 축제 공연 티켓팅 서비스 Uket 프로젝트의 로그인 기능을 개발하던 와중 발생한 에러,,, 에러 전문 2024-04-16T10:14:19.771+09:00 ERROR 85157 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause java.lang.StackOverflowError: null at java.base/java.lang.ref.Reference.refersToImpl(Refer..
-
[Spring Data Jpa] existsBy의 알 수 없는 join...개발/Spring 2024. 3. 28. 16:43
문제 상황 // In AttendeeRepository public interface AttendeeRepository extends JpaRepository, AttendeeRepositoryCustom { Boolean existsByMemberIdAndScheduleId(Long memberId, Long scheduleId); } Spring Data Jpa를 네이밍으로 Query를 만들어 편하게만 사용하는 경우 내가 의도치 않은 Query가 발생하기도 합니다. 위 메서드의 경우 실제 Query는 아래 사진과 같이 나갔습니다. 전 join을 하는 것을 전혀 의도하지 않았는데 말이죠,,, 쓸데없이 조인을 하는 건 원치 않았습니다. Attendee가 이미 member_id와 schedule_id를 가..
-
[Spring] CORS 관련 설정해보기 (@WebMvcConfigurer)개발/Spring 2023. 12. 31. 19:36
들어가기 앞서.. 소문만 무성했던 cors 웹 개발에 있어서 한번씩 겪게되는 난관이라고 한다. 이번 포스트에서 cors가 뭔지, cors를 해결하기 위해 java Spring에서는 어떤 방식을 사용해야하는지 알아보자! CORS CORS(Cross-Origin Resource Sharing, 교차 출처 리소스 공유) 는 말 그대로 해석해보면 교차하는 출처끼리 리소스 공유를 허용한다는 의미이다. Origin(출처) https://lswnscel.tistory.com:433/manage/newpost?type=post#fragment https:// -> protocal lswnscel.tistory.com -> host :433 -> port /manage/newpost -> path ?type=post -..