H2 schema still generated when spring.jpa.generate-ddl=false

大城市里の小女人 提交于 2021-02-11 12:33:32

问题


I am using Spring Boot 2.1.3 with an H2 in memory database for testing. When I run my tests, the schema gets generated even when I specify the following property.

spring.jpa.generate-ddl=false

It seems that because Spring Boot defaults the following property when using H2

spring.jpa.hibernate.ddl-auto=create-drop

That this takes precedence over spring.jpa.generate-ddl=false

Is this a bug?

来源:https://stackoverflow.com/questions/55575505/h2-schema-still-generated-when-spring-jpa-generate-ddl-false

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!