-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CustomSliceResponseDto & HttpMediaTypeNotAcceptTableException Error 해결
- Loading branch information
Showing
4 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/example/Pick_Read_Me/Domain/Dto/CustomSlice/CustomSliceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.example.Pick_Read_Me.Domain.Dto.CustomSlice; | ||
|
||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.domain.SliceImpl; | ||
|
||
import java.util.List; | ||
|
||
public class CustomSliceImpl<T> extends SliceImpl<T> { | ||
|
||
private int customField; | ||
|
||
public CustomSliceImpl(List<T> content) { | ||
super(content); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/example/Pick_Read_Me/Domain/Dto/CustomSlice/CustomSliceResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.Pick_Read_Me.Domain.Dto.CustomSlice; | ||
|
||
import com.example.Pick_Read_Me.Domain.Dto.PostDto.GetPostDto; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class CustomSliceResponseDto<T> { | ||
|
||
private List<GetPostDto> content; | ||
private Long nowPage; | ||
private Long totalPage; | ||
private int countContent; | ||
|
||
public CustomSliceResponseDto(List<GetPostDto> content, Long nowPage, Long totalPage, | ||
int countContent) { | ||
this.content = content; | ||
this.nowPage = nowPage; | ||
this.totalPage = totalPage; | ||
this.countContent = countContent; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters