We should clarify what should happen when a query annotation is configured with a query and a named query:
@Query(value="select * from User", name = "User.findBySpringDataNamedQuery")
Right now, the provided string query is used. Ideally, we do something towards helping to understand that such a configuration creates ambiguity.
See also spring-projects/spring-data-jpa#2319.