반응형

전체 글 192

Spring Boot BeanCurrentlyInCreationException 순환 의존성 해결하기

Spring Boot 실행 시 BeanCurrentlyInCreationException과 circular reference 오류가 발생할 때 의존성 고리를 찾고 서비스 책임을 분리하는 방법Spring Boot BeanCurrentlyInCreationException 순환 의존성 해결하기서비스를 추가한 뒤 Spring Boot 애플리케이션이 시작되지 않았습니다. 로그에는 다음과 같은 메시지가 표시됐습니다.The dependencies of some of the beans in the application context form a cycle아래쪽에는 BeanCurrentlyInCreationException도 함께 보였습니다.처음에는 @Lazy를 붙이거나 생성자 주입을 필드 주입으로 바꾸면 된다는 해결..

IT Tech/Java 2026.08.07

React Cannot update a component while rendering a different component 오류 해결

React에서 Cannot update a component while rendering a different component 경고가 발생할 때 render 중 setState 호출, event handler와 Effect 위치를 확인하는 방법React Cannot update a component while rendering a different component 오류 해결자식 component에서 API 결과를 확인해 부모 state를 바꾸는 코드를 추가한 뒤 다음 경고가 발생했습니다.Cannot update a component (`App`)while rendering a different component (`Child`).화면은 얼핏 정상으로 보였지만 개발 환경에서 경고가 반복됐고 조건을 조금..

IT Tech/React 2026.08.07

Nginx Spring Boot 502 Bad Gateway 오류 해결 순서

Nginx에서 Spring Boot로 proxy_pass할 때 502 Bad Gateway가 발생하면 upstream 실행 상태, 주소, 포트, Docker network와 로그를 확인하는 방법Nginx Spring Boot 502 Bad Gateway 오류 해결 순서도메인과 HTTPS 설정을 마친 뒤 Nginx 화면까지는 열렸지만 API 요청에는 다음 응답이 왔습니다.502 Bad GatewaynginxSpring Boot log에 요청이 남지 않았고 브라우저에서는 원인을 알 수 없었습니다. Nginx 설정을 여러 번 바꾸기보다 reverse proxy가 실제 upstream에 연결할 수 있는지부터 확인해야 했습니다.502는 Nginx가 gateway 역할을 하면서 upstream으로부터 정상적인 응답..

IT Tech/nginx 2026.08.07

Spring Data JPA detached entity passed to persist 오류 해결

Spring Data JPA와 Hibernate에서 detached entity passed to persist 오류가 발생할 때 Entity 상태, CascadeType.PERSIST, ID와 트랜잭션 경계를 확인하는 방법Spring Data JPA detached entity passed to persist 오류 해결게시글을 저장하면서 기존 회원 Entity를 연결했는데 transaction commit 시점에 다음 예외가 발생했습니다.org.hibernate.PersistentObjectException:detached entity passed to persistrepository의 save()를 호출했기 때문에 저장과 수정이 자동으로 구분될 것이라고 생각했습니다. 하지만 연관관계의 cascade가..

IT Tech/Java 2026.08.07

Docker port is already allocated 오류가 날 때 포트 충돌 해결하기

Docker와 Docker Compose 실행 시 port is already allocated 또는 bind address already in use 오류가 발생할 때 host 포트 점유 프로세스와 매핑을 확인하는 방법Docker port is already allocated 오류가 날 때 포트 충돌 해결하기Docker Compose로 Spring Boot 컨테이너를 올리는데 다음 오류가 발생했습니다.Bind for 0.0.0.0:8080 failed:port is already allocated환경에 따라 다음 메시지가 표시되기도 합니다.listen tcp 0.0.0.0:8080:bind: address already in use처음에는 컨테이너 내부의 Spring Boot port를 무조건 바꿔야 ..

IT Tech/docker 2026.08.07

[전주 배달 맛집] 메르밀진미집 콩국수 - 더운 날에는 역시 시원한 콩국수

전주 메밀요리 맛집 메르밀진미집에서콩국수를 배달해 먹어본 솔직한 후기입니다.고소한 콩물과 메밀면이잘 어울렸던 여름 한 끼였어요. 요즘 날씨가 너무 더워서뜨거운 음식은 생각만 해도 땀이 나더라구요.점심은 먹어야겠는데 밖에 나가기는 싫고,뭘 먹야하할지 고민을 하고 있었어요. 배달 앱을 한참 보다가메르밀진미집 콩국수가 눈에 들어왔어요.메르밀진미집은 소바로유명한 곳인 줄만 알았는데콩국수도 많이 드시더라구요. 오늘은 시원하고 고소한 게 먹고 싶어서콩국수를 주문해 봤습니다. 배달은 무사히 잘 도착했어요.국물 있는 음식은 오는 길에한 번 기울어지기 시작하면 대참사가 벌어지잖아요.다행히 오늘은 봉투 안도 얌전했습니다. ㅎㅎ 이제는 배달을 할 때콩가루같은 것을 스틱형태로주더라고요. 콩에 콩가루라니.고소함에 꽤 ..

일상/맛집 2026.08.04

Spring Boot에서 Failed to configure a DataSource 오류가 날 때

Spring Boot 실행 시 url attribute is not specified와 Failed to determine a suitable driver class 오류가 발생할 때 의존성, 프로필, JDBC URL과 환경 변수를 확인하는 방법Spring Boot에서 Failed to configure a DataSource 오류가 날 때Spring Boot 프로젝트에 JPA를 추가한 뒤 애플리케이션이 시작되지 않았습니다. 로그의 마지막 부분에는 다음 오류가 남았습니다.Failed to configure a DataSource:'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to d..

IT Tech/Java 2026.08.04

React useEffect에서 Maximum update depth exceeded 오류가 날 때

React useEffect가 무한 반복되며 Maximum update depth exceeded 오류가 발생할 때 dependency, state update, object와 function 참조를 확인하는 방법React useEffect에서 Maximum update depth exceeded 오류가 날 때화면을 열자 API 요청이 계속 반복되고 console에 다음 경고가 나타났습니다.Maximum update depth exceeded.Network 탭에는 같은 요청이 수십 번 쌓였고 component log도 멈추지 않았습니다. 처음에는 dependency array에서 값을 지우거나 ESLint의 exhaustive-deps 경고를 끄면 해결될 것이라고 생각했습니다. 요청은 줄어들 수 있지만 ..

IT Tech/React 2026.08.04

Docker permission denied while trying to connect to the Docker daemon 오류 해결

Linux에서 Docker daemon socket permission denied 오류가 날 때 daemon 상태, context, socket 소유권과 docker 그룹을 안전하게 확인하는 방법Docker permission denied while trying to connect to the Docker daemon 오류 해결Ubuntu 서버에 Docker Engine을 설치하고 docker ps를 실행했는데 다음 오류가 발생했습니다.permission denied while trying to connect to the Docker daemon socketat unix:///var/run/docker.socksudo docker ps는 동작했기 때문에 socket을 chmod 666으로 바꾸면 된다는..

IT Tech/docker 2026.08.04

Spring Boot JPA에서 LazyInitializationException이 발생할 때

Spring Boot JPA Entity의 연관관계를 조회하다 could not initialize proxy 오류가 날 때 transaction 경계, DTO 변환과 fetch join을 구분해 적용하는 방법Spring Boot JPA에서 LazyInitializationException이 발생할 때주문 상세 API에서 Order를 정상 조회했는데 response를 만드는 순간 LazyInitializationException이 발생했습니다. repository log에는 select가 성공했고 order.getId()도 정상적으로 읽혔지만 order.getMember().getName()에서 could not initialize proxy - no Session이 나왔습니다.처음에는 모든 연관관계를 ..

IT Tech/Java 2026.07.28
반응형