[BAEL-6318] fix indentation
This commit is contained in:
+5
-4
@@ -14,12 +14,13 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomPageImpl<T> extends PageImpl<T> {
|
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
||||
public CustomPageImpl(@JsonProperty("content") List<T> content, @JsonProperty("number") int number, @JsonProperty("size") int size, @JsonProperty("totalElements") Long totalElements, @JsonProperty("pageable") JsonNode pageable,
|
||||
@JsonProperty("last") boolean last, @JsonProperty("totalPages") int totalPages, @JsonProperty("sort") JsonNode sort, @JsonProperty("numberOfElements") int numberOfElements) {
|
||||
public CustomPageImpl(@JsonProperty("content") List<T> content, @JsonProperty("number") int number,
|
||||
@JsonProperty("size") int size, @JsonProperty("totalElements") Long totalElements,
|
||||
@JsonProperty("pageable") JsonNode pageable, @JsonProperty("last") boolean last,
|
||||
@JsonProperty("totalPages") int totalPages, @JsonProperty("sort") JsonNode sort,
|
||||
@JsonProperty("numberOfElements") int numberOfElements) {
|
||||
super(content, PageRequest.of(number, 1), 10);
|
||||
|
||||
}
|
||||
|
||||
public CustomPageImpl(List<T> content, Pageable pageable, long total) {
|
||||
|
||||
+3
-2
@@ -24,8 +24,9 @@ public class EmployeeClient {
|
||||
.queryParam("page", pageable.getPageNumber())
|
||||
.queryParam("size", pageable.getPageSize());
|
||||
|
||||
ResponseEntity<CustomPageImpl<EmployeeDto>> responseEntity = restTemplate.exchange(uriBuilder.toUriString(), HttpMethod.GET, null, new ParameterizedTypeReference<CustomPageImpl<EmployeeDto>>() {
|
||||
});
|
||||
ResponseEntity<CustomPageImpl<EmployeeDto>> responseEntity = restTemplate.exchange(uriBuilder.toUriString(),
|
||||
HttpMethod.GET, null, new ParameterizedTypeReference<CustomPageImpl<EmployeeDto>>() {
|
||||
});
|
||||
|
||||
return responseEntity.getBody();
|
||||
}
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ public class EmployeeController {
|
||||
}
|
||||
|
||||
@GetMapping("/data")
|
||||
public ResponseEntity<Page<EmployeeDto>> getData(@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size) {
|
||||
public ResponseEntity<Page<EmployeeDto>> getData(@RequestParam(defaultValue = "0") int page,
|
||||
@RequestParam(defaultValue = "10") int size) {
|
||||
List<EmployeeDto> empList = listImplementation();
|
||||
|
||||
int totalSize = empList.size();
|
||||
|
||||
Reference in New Issue
Block a user