所需依赖
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
#caldb
spring.datasource.dynamic.datasource.caldb.driver-class-name=org.postgresql.Driver
spring.datasource.dynamic.datasource.caldb.url=jdbc:postgresql://yourServerAddress:80/database?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
spring.datasource.dynamic.datasource.caldb.username=yourUserName
spring.datasource.dynamic.datasource.caldb.password=yourPassword
参考:http://www.manongjc.com/detail/32-ccddlvdpifrrwlp.html