0

I need some help. Colleague of mine said that I must not return all the entries in DB, when somebody makes getAll request without page and size specified, because that would cause backend crash after some requests at one time. What do you think, is that true and what are possible solutions?

I've searched for some property in application.yml file and also tried to make Pageable argument not null, but in both cases without success.

ggrigorov
  • 1
  • 2
  • Which version of Spring Boot are you using? Can you share some code? – gkatiforis Nov 30 '22 at 21:22
  • 1
    It's preferable to use default values for page-number, page-size, sort-by in your controller, if not specified use the default value. – Kumar Ashutosh Nov 30 '22 at 22:30
  • I found answer to my question here: https://stackoverflow.com/questions/23751193/spring-data-jpa-limit-pagesize-how-to-set-to-maxsize – ggrigorov Dec 01 '22 at 09:57

0 Answers0