2
我使用下面的代碼來測試SchemaExport。Hibernate 5.1.0.Final format_sql不適用於SchemaExport
def metadata = new MetadataSources(new StandardServiceRegistryBuilder().build())
.addAnnotatedClass(DummyEntity)
.buildMetadata()
def schemaExport = new SchemaExport()
schemaExport.create(EnumSet.of(TargetType.DATABASE), metadata)
Hibernate的閱讀類路徑
hibernate.dialect = <my_dialect>
hibernate.connection.driver_class = <my_driver>
hibernate.connection.url = <my_url>
hibernate.connection.username = <my_username>
hibernate.connection.password = <my_password>
hibernate.hbm2ddl.auto = validate
hibernate.show_sql = true
hibernate.format_sql = true <------- NO EFFECT!
我不知道這是否是Hibernate 5.1.0.Final或其他錯誤文件hibernate.properties?