#StartSETUP
Greetings.
I admit I'm starting to learn what I can learn. And now I'm trying to learn About JPA. After I generate with JPA, SpringBoot Devtool, and also Posters SQL dependency, I want to connect to my database.
But, for 3 days I've stick with this same error:
What I find that the problem is only from the application.properties, but I had research that the config only this:
Any help please
3 Replies
⌛
This post has been reserved for your question.
Hey @an0nym0_us! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
This is what works for me: spring:
datasource:
url: jdbc:postgresql://localhost:5332/customer
# This is the URL for the PostgreSQL Server running in docker using the 5332 mapping
# Note 1: We can switch the port number to 5432 and connect to the PostgreSQL Server
# running in localhost. But we will stick with the PostgreSQL running in docker for now.
# "customer" is the name of the database that we are going to be creating
username: postgres # username we created for PostgreSQL Server running in Docker
password: password # password we created for PostgreSQL Server running in docker
jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: true
show-sql: true
main:
web-application-type: servlet
Below is the pox.xml file
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.