Register SpringBeanContainer with default Hibernate setup

Closes gh-13717
This commit is contained in:
Stephane Nicoll
2018-10-02 16:41:02 +02:00
parent 7bf32290c6
commit 068040e227
6 changed files with 106 additions and 10 deletions

View File

@@ -2000,6 +2000,17 @@ for more details.
[[howto-use-dependency-injection-hibernate-components]]
=== Use Dependency Injection in Hibernate Components
By default, Spring Boot registers a `BeanContainer` implementation that uses the
`BeanFactory` so that converters and entity listeners can use regular dependency
injection.
You can disable or tune this behaviour by registering a `HibernatePropertiesCustomizer`
that remove or change the `hibernate.resource.beans.container` property.
[[howto-use-custom-entity-manager]]
=== Use a Custom EntityManagerFactory
To take full control of the configuration of the `EntityManagerFactory`, you need to add

View File

@@ -66,7 +66,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:code-examples: ../java/org/springframework/boot/docs
:test-examples: ../../test/java/org/springframework/boot/docs
:gradle-user-guide: https://docs.gradle.org/4.2.1/userguide
:hibernate-documentation: https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html
:hibernate-documentation: https://docs.jboss.org/hibernate/orm/5.3/userguide/html_single/Hibernate_User_Guide.html
:jetty-documentation: https://www.eclipse.org/jetty/documentation/9.4.x
:jooq-manual: https://www.jooq.org/doc/{jooq-version}/manual-single-page
:micrometer-concepts-documentation: https://micrometer.io/docs/concepts