美文网首页
getHibernateProperties cannot re

getHibernateProperties cannot re

作者: 这里有鱼 | 来源:发表于2019-03-09 13:18 被阅读0次

    以前使用的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();
        }
    

    相关文章

      网友评论

          本文标题:getHibernateProperties cannot re

          本文链接:https://www.haomeiwen.com/subject/pazayftx.html