Notice
Recent Posts
Recent Comments
Link
반응형
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 코틀린
- 딥시크
- Mono
- db
- exception
- 컨퍼런스
- API
- Spring
- 허깅 페이스
- 로그인
- 보안
- AWS
- Spring Boot
- 본인인증
- 본인확인
- netty
- webflux
- postgis
- 인증
- deepseek vs chatgpt
- IntelliJ
- PostgreSQL
- docker
- AOP
- 공동인증서
- ktlin
- Flux
- Kotlin
- spring security
- NGINX
Archives
- Today
- Total
[수미수의 개발 브로구]
[Spring] .w.s.m.s.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException] 오류가 났을 때 해결 방안 본문
Language & Framework/Spring
[Spring] .w.s.m.s.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException] 오류가 났을 때 해결 방안
수미수 2023. 10. 6. 23:52반응형
오류 내용
스프링 실행 시 .w.s.m.s.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException] 오류가 발생
.w.s.m.s.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException]
해결 방안
ManyToOne 참조 부분에서 아래와 같이 변경 한다.
...............
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property="id", scope= ServerRequest.class)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "user_id", nullable = false)
private User user;
...............
또는
아래와 같이 JsonIgore 어노테이션을 붙인다.
...............
@JsonIgnore
public User getUser() {
return user;
}
@JsonIgnore
public void setUser(User user) {
this.user = user;
}
...............
반응형