I have a proyect that use to load queries this:
@Query(value = SELECT_BY_USER_ID, nativeQuery = true)
Employee findByUserId(@Param(\"userId\") String userId);
>
Unfortunately, spring data doesn't seem to support direct properties reference withing @Query anno (like in @Value). Despite that and assuming you use spring-data-jpa and Hibernate it is possible to use an external .xml file to store your queries as named queries and refer to them by method name, or like
@Query(nativeQuery = true, name="Repository1.query1")
This is a nice article on this matter : JPA Queries in XML File and it describes how to place your .xml file elsewhere than the expected orm.xml