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

前端 未结 6 2092
抹茶落季
抹茶落季 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:34

    Combined settings

    I tried the suggestions given by @craig-ringer

    jdbc:postgresql://100.64.35.52":5432/masterdb?ssl=true
    

    and given by @amit

    jdbc:postgresql://100.64.35.52":5432/masterdb?sslmode=require
    

    neither worked. But when I combined them to:

    jdbc:postgresql://100.64.35.52":5432/masterdb?ssl=true&sslmode=require
    

    It worked.

提交回复
热议问题