title: How to get the specific property value from .properties file in Spring Data Repository interface method @Query
body: <p>I am able to get the property value in Spring classes like below:</p>
  
  <pre><code>@Value("${database.name}")
  private String databaseName;
  </code></pre>
  
  <p>I have to execute a native query by joining different tables which are in different databases. </p>
  
  <pre><code>@Query(value="select t1.* FROM db1.table1 t1 INNER JOIN db2.table2 t2 ON t2.t1_id1 = t1.id1")
  </code></pre>
  
  <p>Instead of hard coding database names i.e., db1 and db2 here, I have to get them from properties file.</p>
  
  <p>how to get the property value inside the @Query annotation in Spring Data JPA Repository ?</p>