Clark To Do The blog of Clark

Spring JPA Hibernate - Properties

Initialize properties

  1. HibernateJpaAutoConfiguration super class JpaBaseConfiguration enables JpaProperties
  2. JpaProperties fetch all spring.jpa.hibernate.* or spring.jpa.properties.hibernate.* into a map
  3. entityManagerFactoryBuilder initialize EntityManagerFactoryBuilder with properties above
  4. EntityManagerFactoryBuilder put properties into JpaPropertyMap

Initialize bean with properties

  1. JpaBaseConfiguration.entityManagerFactory build LocalContainerEntityManagerFactoryBean
  2. LocalContainerEntityManagerFactoryBean call buildNativeEntityManagerFactory
  3. then call createNativeEntityManagerFactory
  4. SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory create EntityManagerFactoryBuilderImpl
  5. StandardServiceRegistry create StandardServiceRegistryBuilder and build StandardServiceRegistryImpl
  6. EntityManagerFactoryBuilderImpl pass properties into ssrBuilder.build() via configurationValues
  7. StandardServiceRegistryBuilder create bunch of initiators, such as: BatchBuilderInitiator
comments powered by Disqus