r/SpringBoot • • Apr 06 '26

Discussion Open source Spring Boot library for declarative API querying with RSQL

Post image

Hi everyone, I've recently been working on spring-web-query, an open source library that allows you to easily implement filtering, pagination and sorting in Spring Boot APIs in a declarative manner. It supports declarative querying with RSQL (RESTful Service Query Language, a URI-friendly query language), DTO-aware contracts, nested field paths, and Spring Boot auto-configuration.

If that sounds useful, I'd love for you to check it out and share feedback: https://github.com/abansal755/spring-web-query

I’ve been actively working on this for the past month. It’s evolving quickly, and I’m continuing to improve it based on real usage and feedback. Contributions, ideas, and feedback are all welcome.

28 Upvotes

7 comments sorted by

View all comments

9

u/Kvuivbribumok Apr 06 '26

Calling repositories directly from the controller ? That sounds like a bad idea ? Or am I missing something here ?

2

u/kqr_one Apr 07 '26

for the read, it might be OK

2

u/Groundbreaking-Word6 Apr 07 '26

This is just an example, you can certainly call repository methods from service layer, perhaps even compose other specifications with the one you got from the RSQL. The main point of this is that if you put the WebQuery annotation on a controller method and have a Specification parameter (Pageable too), it will automatically be resolved from the RSQL filter query param