问题
Spring Data has a native web support for Pageable send over the web, as parameters in HTML Query, through PageableHandlerMethodArgumentResolver.
I have not found JPA Specification executor for that, which from my point of view would be very useful.
Is there one?
回答1:
The reason that there's no generic one available for you is that the predicates you build in it is completely depending on your domain model. A good example for how to use Specification
s with Spring MVC can be found in the answer to this question.
来源:https://stackoverflow.com/questions/20722419/is-there-generic-specification-for-jpaspecificationexecutor-to-use-in-web