Skip to content

biagioT/jpa-search-helper-demo

Repository files navigation

Spring Boot demo project for JPA Search Helper

Start the application and try it:

./gradlew bootRun

Examples:

Note: the search requires pagination: it is mandatory to set pageSize or _limit depending on the endpoint.

Mode 1

curl --location 'http://localhost:8080/books?copiesSold_lte=500&_limit=10'

or

curl --location 'http://localhost:8080/books?_limit=10&authors.name_contains=John'

Mode 2

curl --location 'http://localhost:8080/books' \
--header 'Content-Type: application/json' \
--data '{
    "filter": {
        "operator": "or",
        "filters": [
            {
                "operator": "eq",
                "value": "1034567890123456",
                "key": "isbn"
            },
            {
                "operator": "in",
                "values": [
                    "1034567890123456",
                    "1234567890123456"
                ],
                "key": "isbn"
            },
            {
                "operator": "and",
                "filters": [
                    {
                        "operator": "null",
                        "key": "title",
                        "options": {
                            "negate": false
                        }
                    },
                    {
                        "operator": "lt",
                        "key": "pages",
                        "value": 10
                    }
                ]
            }
        ]
    },
    "options": {
        "pageSize": 4
    }
}'

About

Spring Boot demo project for jpa-search-helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages