title: How to create SessionFactory bean when datasource is defined but not xml but by configuration bean
body: <p>Hibernate 5.4</p>
  <p>The dialect is known, I need to implement the following method :</p>
  <pre><code>@Bean
  public org.hibernate.SessionFactory sessionFactory(DataSource dataSource) {
      // hibernate.dialect = &quot;org.hibernate.dialect.PostgreSQL95Dialect&quot;
      // ???
  }
  </code></pre>