I am using spring-boot 1.5.6 RELEASE. I want to do a basic thing, move my queries from the @Query annotation in the repository to any xml file.
Create META-INF inside resources folder . Now create jpa-named-queries.properties file inside that META-INF folder.
Write your query inside this properties file like this:
Customer.findAllCustomerByNamedQuery=Select c from Customer c
Where Customer denote name of entity class and findAllCustomerByNamedQuery is the query name
In your customer repository write this to call your query written in properties file:
List<Customer> findAllCustomerByNamedQuery();