use*_*833 2 java postgresql hibernate heroku
我正在编写一个struts2应用程序并使用hibernate进行持久化.我在heroku上部署了app应用程序,一切正常,但是当我在本地运行时,我得到:
org.postgresql.util.PSQLException: FATAL:no pg_hba.conf entry for host "xx.xx.xxx.xxx", user "someuser", database "somedatabase", SSL off
Run Code Online (Sandbox Code Playgroud)
我知道问题是我需要通过ssl连接到数据库但是如何在本地设置它?
将其添加到JDBC连接URL的末尾:
?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
802 次 |
| 最近记录: |