Example of working with Spring Data JPA repositories
Clone or download
Pull request Compare This branch is 14 commits ahead of belyaev-andrey:master.
Latest commit 0648f0f Dec 18, 2018


Spring Data JPA Usage

This component adds Spring Data JPA repositories to CUBA platform. This is an experimental feature.

Before usage, install it to the local repository:

  • Create database and build the artifact gradlew startDb createDb build - you need database for tests.
  • Install artifact to a local repository gradlew publishToMavenLocal

Add the module to build file as an additional component in your build.gradle:

dependencies {

See blog post about using this component in more details.


  • There might be some issues if you use entity names that may clash with SQL reserved words: order, like, select, etc.
  • Custom queries has limited abilities, we do not match method parameter names and custom query parameter names.
  • If you want to specify like clause with wildcards and parameters in query annotation, please use concat function and named parameters like in the example: select ... where ... like concat('?', :name, '%')