문제 원인
해결 방법
@Getter
public class MultiResponseDto<T> {
private List<T> data;
private PageInfo pageInfo;
public MultiResponseDto(List<T> data, Page page) {
this.data = data;
this.pageInfo = new PageInfo(page.getNumber() + 1,
page.getSize(), page.getTotalElements(), page.getTotalPages());
}
@AllArgsConstructor
@Getter
public class PageInfo {
private int page;
private int size;
private long totalElements;
private int totalPages;
}
}
@AllArgsConstructor
@Getter
public class SingleResponseDto<T> {
private T data;
}