Bla*_*y-Z 4 java postgresql hibernate jpa spring-boot
我的文件中有这段代码application.properties:
# Spring DataSource
spring.datasource.driverClassName=org.postgresql.Driver
spring.sql.init.mode=always
spring.sql.init.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/dbname
spring.datasource.username=postgres
spring.datasource.password=root
# JPA-Hibernate
spring.jpa.generate-ddl=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=create
# /sf/ask/3073358361/
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
# Optimization for POSTGRES queries
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,我spring.jpa.hibernate.ddl-auto=create添加了该行,但 JPA 仍未创建表。我必须手动创建它们才能编译项目。怎么了?
| 归档时间: |
|
| 查看次数: |
12333 次 |
| 最近记录: |