Page 1 of 1

Spring Boot - JPA Hibernate erstellt Tabellen nicht automatisch?

Posted: 11 Jan 2025, 08:03
by Guest
Ich habe diesen Code in meiner application.properties-Datei:

Code: Select all

# 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

# https://stackoverflow.com/questions/43905119/postgres-error-method-org-postgresql-jdbc-pgconnection-createclob-is-not-imple
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true

# Optimization for POSTGRES queries
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
Wie Sie sehen können, habe ich die Zeile spring.jpa.hibernate.ddl-auto=create hinzugefügt, aber die Tabellen werden immer noch nicht von der JPA erstellt. Ich muss sie manuell erstellen, damit das Projekt kompiliert werden kann. Was ist los?