是什么导致JHipster中的此连接错误?
2019-07-15 10:11:55.643 DEBUG 30748 --- [nfoReplicator-0] org.postgresql.Driver : Connecting with URL: jdbc:postgresql://localhost:5432/{application_name}
2019-07-15 10:11:55.643 DEBUG 30748 --- [nfoReplicator-0] o.p.core.v3.ConnectionFactoryImpl : Trying to establish a protocol version 3 connection to localhost:5432
2019-07-15 10:11:55.644 DEBUG 30748 --- [nfoReplicator-0] org.postgresql.Driver : Connection error:
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.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:280)
答案 0 :(得分:0)
您忘记了启动Postgresql,如果您尚未将其安装在PC上,则可以按照https://www.jhipster.tech/docker-compose/#4
中的文档说明使用Docker启动它。docker-compose -f src/main/docker/postgresql.yml up