I have a Spring Boot app and I created a PostgreSql database in a Docker container. I can connect to that database using tools, but when I run my Spring Boot app, it cannot create table even if the following log is seen on debug screen:
Hibernate: drop table if exists public.employees cascade
Hibernate: create table public.employees (id bigserial not null, email varchar(255), first_name varchar(255), last_name varchar(255), primary key (id))
Here is my properties file (I use PostgreSql 9+, database name is employee_management_system):
spring.datasource.url=jdbc:postgresql://localhost:5434/employee_management_system
spring.datasource.username=postgres
spring.datasource.password=******
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL92Dialect
spring.jpa.properties.hibernate.default_schema = public
spring.jpa.hibernate.ddl-auto = create
spring.jpa.show-sql = true
I do not use a DOckerfile or docker-compose.yml (I think I do not need for this step as I already have a container for my PostgreSql database). Any idea?