Latest project I used Spring boot and Spring Data Jpa, and in some web interface user can dynamic search some records,e.g. search order by createdDate, search goods by name and so on. Because exist many search conditions, e.g name,brand,status and so on. So I used Jpa Specification to implement dynamic search. So page could pass below query parameter to search records, e.g.
GET /goods?search_LIKE_name=foo #fuzzy search goods by name
GET /goods?search_LIKE_name=foo&search_EQ_status=1 #fuzzy search goods by name and status
and so on.
But if page pass nothing, then it will select all. I don't want this happen. And I know mysql command line have an option called --select_limit, So how could I configure it globally to limit select count? e.g. in application.properties
spring.sql_select_limit=1000