Reputation: 11
I want to pass dynamic native queries based on my database specific profile. So how to read value from application.yml file for the @Query annotation?
public EmployeeRepo extends CRUDRepository<Employee, Integer>{
@Query("${my-query}")
List<Employee> findBy();
}
application.yml:
my-query: Some-query
.
Upvotes: 0
Views: 662