Skip to content

christos-karalis/spring-data-rest-extension

Repository files navigation

Custom Spring Data Rest Extension Build Status codecov

It is an extension to the functionality of Spring Data Rest (currently only working with Spring Data JPA). It provides rest services to implement advanced searches and saves by the provided entity classes and generated Querydsl query types. Additionally, it requires the @RepositoryRestResource that exports the rest services.

Examples of search json:

{
  "operator" : "OR",
  "operands" : {
      "_comment" : "matches the records name ingore case and it contains 'John'",
      "and" : {
        "name" : "David",
        "surname" : "Mend"
      },
      "or" : [{
            "city" : "http://localhost/city/2"
          },
          {
            "city" : {
              "county" : "http://localhost/county/2"
            }
          }
      
      ],
      "birthDate" : {
        "from" : 631152000000,
        "to" : 788918400000
      },
      "or" : [
          {
              "visits" : {
                "from" : 100
              }, 
              "visits" : 1
          }
      ]
  }
}

More details on Wiki

About

Spring Data Rest - Query DSL Extended Search/POST functionalities

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published