title: Get values from class to Hibernate configuration
body: <p>I have my hibernate.cfg.xml</p>
  
  <p>There is field:</p>
  
  <pre><code>&lt;property name="hibernate.connection.username"&gt;username&lt;/property&gt; // getUser()???
  </code></pre>
  
  <p>I have class Detail.java, which has getter:</p>
  
  <pre><code>public String getUser() {
      return user;
  }
  </code></pre>
  
  <p>How can I access that method from my hibernate configuration XML file?</p>