org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host

前端 未结 6 2077
抹茶落季
抹茶落季 2020-12-23 20:10

I am trying to connect to PostgreSQL database which is in remote location using Spring JDBC template. I am getting

org.postgresql.util.PSQLException:

6条回答
  •  轮回少年
    2020-12-23 20:18

    It seems that DB server does not allow SSL off connection, You will have to enable it. Change URL from jdbc:postgresql://100.64.35.52":5432/masterdb to jdbc:postgresql://100.64.35.52":5432/masterdb?sslmode=require

    Check mode details about ssl mode at http://www.postgresql.org/docs/9.1/static/libpq-ssl.html

提交回复
热议问题