Skip to content
Advertisement

Spring boot won’t connect to Postgres database

I am trying to learn Spring Boot with a tutorial. I have the code and the database, but I keep getting a Hibernate ERROR whenever I try to connect the two…

This is the Error I get:

JavaScript

I have the dependency set up in my pom.xml:

JavaScript

The StudentService

JavaScript

And the StudentController class

JavaScript

application.properties:

JavaScript

Unfortunately I have no idea what’s the problem or what I can do to improve it. I googled, but only found “the password not filled in” (which is not the case) and “the application.properties not being in the resources folder” (which they are…)

Thank you so much already for looking through it and if I can clarify anything, I am happy to do so.

Edit: sorry for posting it as pictures I replaced everything but the error code if I should change that too just tell me

If I am correct, the version of the PostgreSQL is 14.4 the text from the pg_hba.config:

JavaScript

Advertisement

Answer

I fixed it by now. The problem was that I wrote hibernat instead of hibernate in the application.properties…

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement