I’m trying to create a Spring Boot API and connect it to a simple Postgresql database that I have created . I am connecting to a local server. I’m trying to set up the connection so that my table is created in the database I want. Every time I do so and I go back to my SQL Shell, I find that there is no relation in my database, meaning the table is never actually created.
The username I have set up is my name, and the database name I have set up is student. Every time I go into the student database, there is no relation. However, whenever I go into the Postgres database(owned by Postgres user) I am able to find the relation that I was trying to create in my student database. What could be the reason for this.
Also, I have configured my application.properties file to work with my username and the student database. But every time I rerun the Spring Boot application, it changes it the configurations back to the Postgres username and the Postgres database.
I tried using the table annotation to specify the name of the table I would like associated with my class. That didn’t do anything. I’ve restarted my IDE multiple times. That hasn’t done anything. I am not getting any errors or exceptions, just cannot find the relation where I want it to be
Rezi Ogbogbaidi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.