Spring Boot - JPA Hibernate erstellt Tabellen nicht automatisch?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Spring Boot - JPA Hibernate erstellt Tabellen nicht automatisch?

by Guest » 11 Jan 2025, 08:03

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?

Top