Add support for advanced customization of Hibernate settings
As HibernateJpaConfiguration is package private, it is no longer possible to extend the default Spring Boot configuration to apply advanced settings. The most notable use case for this is the customization of Hibernate properties using instance value vs. string value that can be set using the "spring.jpa.properties" namespace. This commit adds a HibernatePropertiesCustomizer callback interface that can be implemented to tune Hibernate properties at will. Closes gh-11211
This commit is contained in:
@@ -1787,6 +1787,11 @@ In addition, all properties in `+spring.jpa.properties.*+` are passed through as
|
||||
JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is
|
||||
created.
|
||||
|
||||
TIP: if you need to apply advanced customization to Hibernate properties, consider
|
||||
registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating
|
||||
the `EntityManagerFactory`. This takes precedence to anything that is applied by the
|
||||
auto-configuration.
|
||||
|
||||
|
||||
|
||||
[[howto-configure-hibernate-naming-strategy]]
|
||||
|
||||
Reference in New Issue
Block a user