I use spring boot 3.3.2,
Spring boot seem to have changed the structure of paging.
we get before
{
"content": [],
"pageable": {
"pageNumber": 0,
"pageSize": 2000,
"sort": {
"empty": false,
"sorted": true,
"unsorted": false
},
"offset": 0,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 0,
"totalElements": 0,
"size": 2000,
"number": 0,
"sort": {
"empty": false,
"sorted": true,
"unsorted": false
},
"first": true,
"numberOfElements": 0,
"empty": true
}
Now you that seem to have changed for
{
"content": [],
"page": {
"size": 100,
"number": 0,
"totalElements": 0,
"totalPages": 0
}
}
I had put this config to do conversion automatically
@Configuration
@EnableSpringDataWebSupport(
pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO
)
public class JacksonConfig {
}
strangely, spring continue to return old structure…
also in my property i have this
spring.data.web.pageable.default-page-size=100
but like you can see when there is not value, page size returned show 2000
i search 2000 in my code, i have nothing