首页 > 解决方案 > Spring JPA 属性不生成数据库

问题描述

大家晚安,我正在尝试生成 create.sql 文件,以便我可以使用 create.sql 文件将从查询生成的命令轻松地在 postresSQL 中创建我的数据库,但 create.sql 文件不是使用代码自己生成的下面有人可以帮我解决这个问题吗?

spring.jpa.properties.javax.persistence.schema-generation.create-source=metadata
spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql
spring.jpa.properties.hibernate.hbm2ddl.delimiter=;

spring.datasource.url=jdbc:postgresql://localhost:5432/dsdeliver
spring.datasource.username=postgres
spring.datasource.password=abrantes1

spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.hibernate.ddl-auto=none

标签: javaspring-bootjpaspring-data-jpaspring-data

解决方案


推荐阅读