以前使用的jpaProperties.getHibernateProperties(new HibernateSettings());
getHibernateProperties被废弃,新版:
@Resource
private JpaProperties jpaProperties;
@Resource
private HibernateProperties hibernateProperties;
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactorySmartdb(
EntityManagerFactoryBuilder builder, JpaProperties jpaProperties,
HibernateProperties hibernateProperties) {
Map<String, Object> properties = hibernateProperties.determineHibernateProperties(
jpaProperties.getProperties(), new HibernateSettings());
return builder.dataSource(yourDynamicDataSource()).properties(properties)
.packages("your packages path").build();
}