I\'m using spring
with CrudRepository
s for database connection.
Now I require a quite long (several lines) sql query that I\'d prefer to ma
if your project set up has resources folder, create under /META-INF/jpa-named-queries.properties
file and add key value pair as repoClass.methodName=yoursql
. Spring data will pick up.
For longer queries it's probably best to use xml
properties file with CDATA
tags: https://stackoverflow.com/a/19128259/1194415