【发布时间】:2017-12-03 17:44:36
【问题描述】:
使用 Postgres 作为数据库和 Spring Boot + Spring Data 我正在尝试使用以下数据库配置属性以测试模式启动我的应用程序:
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost/members
spring.jpa.hibernate.ddl-auto=create-drop
spring.datasource.username=postgres
spring.datasource.password=password
spring.jpa.show-sql=true
我的表名为“会员”
当我第一次运行应用程序时,我可以看到表已创建。但是我不断收到以下错误:
2017-06-29 21:51:03.092 ERROR 1472 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: drop table member if exists
2017-06-29 21:51:03.093 ERROR 1472 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : ERROR: syntax error at or near "if"
【问题讨论】:
标签: postgresql spring-boot spring-data