我正在尝试从我的Heroku/Spring应用程序创建一个数据源到postgres.heroku.com postgres数据库.这是我的applicationContext.xml片段.
<bean id="securityDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url" value="jdbc:postgresql://url/dstabase"/>
<property name="username" value="user"/>
<property name="password" value="password"/>
</bean>
Run Code Online (Sandbox Code Playgroud)
但是当我运行应用程序时,tomcat会出现此错误:
Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "10.11.12.13", user "username", database "database", SSL off)
Run Code Online (Sandbox Code Playgroud)
如何配置它以使用SSL?我需要它来建立与postgres.heroku.com的连接