Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class ewha.efub.zeje.dto.SpotUserResponseDTO]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class ewha.efub.zeje.dto.SpotUserResponseDTO and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0])] with root cause
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class ewha.efub.zeje.dto.SpotUserResponseDTO and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0])
해당 DTO에 @Getter 붙여서 해결
@Getter
@NoArgsConstructor
public class SpotUserResponseDTO {
...
}
'개발하자 > 🍃 SpringBoot' 카테고리의 다른 글
[자바 ORM 표준 JPA 프로그래밍 - 기본편] 05. 연관관계 매핑 기초 (0) | 2022.10.09 |
---|---|
[자바 ORM 표준 JPA 프로그래밍 - 기본편] 03. 영속성 관리 (0) | 2022.09.18 |
[자바 ORM 표준 JPA 프로그래밍 - 기본편] 02. JPA 시작 (0) | 2022.09.10 |
[SpringBoot] ec2에 배포했을 때 Timezone 한국 시간으로 설정하기 (0) | 2022.08.06 |