org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and

项目启动报错

org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

解决:

Windows+R打开命令框,输入services.msc打开服务列表找到:

右键启动

再次尝试连接数据库,看是否成功。反正我的这样就成功了,如果不成功戳下文看更多解决方法,

原文地址:https://blog.csdn.net/irainreally/article/details/80090134

你可能感兴趣的:(org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and)