如何将JPA属性添加到@Bean

时间:2019-04-15 19:16:22

标签: java spring hibernate jpa

如何按照84.5中所述配置JPA: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-data-access.html#howto-configure-jpa-properties吗?

我想将spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false设置为@Bean,而不是application.properties。

1 个答案:

答案 0 :(得分:0)

Bootstrapping Hibernate 5 with Spring中选中“使用Java配置”

或者,您可以使用弹簧轮廓激活某些属性