Dev/오류 해결 방법 정리
No serializer found for class XXX and no properties discovered to create BeanSerializer
코딩하는 백구
2022. 2. 13. 23:07
상황 : DB에서 읽어온 Entity를 Dto로 response 하는 과정에서 에러 발생
내용 : No serializer found for class XXX and no properties discovered to create BeanSerializer
해결 방법 : Dto 필드에 @JsonProperty 추가
public class UserInfoDto {
@JsonProperty
private String email;
public UserInfoDto(String email) {
this.email = email;
}
}
참고: