title: Why spring.jpa.properties. prefix is not always required in Spring Boot properties
body: <p>I learning Spring boot and found that in some examples use the same properties <strong>with the prefix</strong> <code>spring.jpa.properties</code> while other do it <strong>without prefix</strong>.</p>
  <p><strong>For instance:</strong>
  The article explains second level cahche <a href="https://www.baeldung.com/hibernate-second-level-cache" rel="nofollow noreferrer">https://www.baeldung.com/hibernate-second-level-cache</a> and autor shows example of needed properties (<a href="https://github.com/eugenp/tutorials/blob/007603b3040132f42c898f12b307e6ff6d8fa1cd/persistence-modules/spring-hibernate-5/src/main/resources/persistence-h2.properties#L12" rel="nofollow noreferrer"> example on autor's gitHub</a>):</p>
  <pre><code>hibernate.cache.use_second_level_cache=true
  hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
  </code></pre>
  <p>But it did not work for me, and I spent few hours loking for the reason, but then i noticed, someone use prefix <code>spring.jpa.properties.</code> to get it working (<a href="https://youtu.be/79s1d16ZltU?t=404" rel="nofollow noreferrer">Exact moment from video lesson</a>):</p>
  <pre><code>spring.jpa.properties.hibernate.cache.use_second_level_cache=true
  spring.jpa.properties.hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
  </code></pre>
  <p>Which perfectly worked for me.</p>
  <p><strong>So my questions are:</strong></p>
  <ul>
  <li>why are they working in different way?</li>
  <li>how to understand which properties in which cases requires this prefix?</li>
  <li>is it probably something related to my project settings OR Spring Boot version?</li>
  <li>any other suggestions are appreciated :)</li>
  </ul>
  <p>Thank you in advance!</p>