After upgrade from Spring Boot 2.0.0 M2 to 2.0.0 M6 my Hibernate interceptor implementation don\'t work anymore.
My old implementation:
@Configuratio
I can solve this with this documentation:
Add support for advanced customization of Hibernate settings
Just implements a interface HibernatePropertiesCustomizer
and implements methods customize(Map
@Component
class MyHibernateInterceptorCustomizer implements HibernatePropertiesCustomizer {
@Autowired
MyInterceptor myInterceptor
@Override
void customize(Map hibernateProperties) {
hibernateProperties.put("hibernate.session_factory.interceptor", myInterceptor);
}
}