I have a Spring Boot program that I'm trying to run in a docker container. But appear a problem with the connection from the container to BD that is on my host. I get an error:
org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Data source
spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/xcom
How I can connect from the container to my host? I am working on Windows