title: How to set up org.hibernate.org.hibernate.FlushMode for a Spring Boot application?
body: <p>How can I setup <code>FlushMode.ALWAYS</code> for all sessions in my Spring Boot app? 
  It would be nice to have this setting in <code>application.yml</code>.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried with both in application.yml:</p>
  
  <pre><code>spring.jpa.properties.org.hibernate.flushMode: ALWAYS
  spring.jpa.org.hibernate.flushMode: ALWAYS
  </code></pre>
  
  <p>However next code:</p>
  
  <pre><code>    Session ses = factory.openSession();
      ses.setFlushMode(FlushMode.ALWAYS);
      LOG.debug("!!!Session.FlushMode = " + ses.getFlushMode());
      LOG.debug("!!!NewSession.FlushMode = " + factory.openSession().getFlushMode());
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>DEBUG 47225 ---      : !!!Session.FlushMode = ALWAYS
  DEBUG 47225 ---      : !!!NewSession.FlushMode = AUTO
  </code></pre>