Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anicetkeric/spring-data-mongodb-dynamic-queries
https://github.com/anicetkeric/spring-data-mongodb-dynamic-queries
mongodb spring-boot spring-data-jpa springdatamongodb
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anicetkeric/spring-data-mongodb-dynamic-queries
- Owner: anicetkeric
- Created: 2021-01-21T09:48:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-24T13:46:47.000Z (4 months ago)
- Last Synced: 2024-08-24T14:55:39.930Z (4 months ago)
- Topics: mongodb, spring-boot, spring-data-jpa, springdatamongodb
- Language: Java
- Homepage: https://dzone.com/articles/advanced-search-amp-filtering-api-using-spring-dat
- Size: 85 KB
- Stars: 24
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-data-mongodb-dynamic-queries
Advanced Search and Filtering API Using Spring Data and MongoDB
## Prerequisites
Ensure you have this installed before proceeding further* Spring Boot 3.3.2
* Lombok
* Java 17
* MongoDB## Post link
https://boottechnologies-ci.medium.com/advanced-sort-and-filtering-rest-api-using-spring-data-and-mongodb-3e2f1140a189
## Endpoint demo
```
GET http://localhost:8080/employee/page?page=1&size=5
GET http://localhost:8080/employee/page?page=1&size=5&orders=firstName;ASC
GET http://localhost:8080/employee/page?page=1&size=5&and=firstName;like;C&orders=firstName;DESC
GET http://localhost:8080/employee?orders=firstName;DESC
http://localhost:8080/employee/page?page=1&size=5&and=lastName;like;r&or=department.code;eq;TS&orders=email;DESC```