DefaultComponentSafeNamingStrategy with Spring Boot 2 JPA

DefaultComponentSafeNamingStrategy with Spring Boot 2 JPA

我正在将遗留 Spring 4.2.4 / Hibernate 4.3 应用程序移植到 Spring Boot 2.0.2。此应用程序使用 Hibernate 的 DefaultComponentSafeNamingStrategy。

SpringBoot 2/Hibernate 5.2 的命名策略发生了变化。有很多文档解释了新的物理和隐式命名策略,但我没有找到任何关于哪种命名策略可以替代旧的 DefaultComponentSafeNamingStrategy 的信息。

所有 table、列等名称都按原样生成,这显然非常重要。如果那不可能,我希望看到一些接近的策略文档,以及它们与过去可用的策略有何不同。到目前为止没有找到任何运气...

从正确的角度来看,此应用程序的数据库包含将近 600 table 秒,因此对每个 table 和列进行映射需要很长时间:(

是否有关于从遗留迁移策略迁移的有用文档?我应该求助于创建自己的策略还是有接近并可以扩展的策略?

原来我没有完全理解 Hibernate 5 的命名方法。通过配置隐式和物理命名策略,可以实现与 DefaultComponentSafeNamingStrategy 相同的映射策略:

spring:
  jpa:
    hibernate:
      naming:
        implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl
        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl