我有一个Spring应用程序,我希望创建带有实体注释的表。当我运行jar时,如果表已经存在,应用程序将在没有警告的情况下启动。DDL "alter table mytable drop constraint if exists FKk53mrkxu32slsax6fmn164ijy" via JDBC Statementorg.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL</e
我使用了spring-boot,并有一个这样配置的H2数据库(在application.properties中)。=org.h2.Driverspring.datasource.password=
spring.jpa.database-platform: alter table key_request drop constraint FK_53shrbc21c25insk
我认为问题可能出在我的application.properties文件中,其中我将spring.jpa.hibernate.ddl-auto指定为validate。我这样做是为了使hibernate在创建表时不会修改SQL。也许使用create-drop可以解决这个问题?ddl auto (create, create-drop, update): with "create-drop" the database
#
我开始尝试SpringBoot,作为其中的一部分,我想创建一个内存中的DB来使用和引导应用程序。因此,当我尝试通过DAO访问数据时,虽然看起来一切正常(日志中没有错误,日志显示它找到了创建模式的sql并尝试运行data.sql语句),但我没有得到异常,也没有返回任何数据。我已经将Spring Data / H2内容添加到我的pom中: <groupId>org.springframework.boot&