以下是代码的外观:
摇篮
dependencies {
compile("org.springframework.boot:spring-boot-starter-web",
"org.projectlombok:lombok:1.16.14",
"org.springframework.boot:spring-boot-starter-data-jpa")
compile files("lib/RedshiftJDBC42-1.2.1.1001.jar")
testCompile('org.springframework.boot:spring-boot-starter-test')
}
application.properties
spring.datasource.driver-class-name=com.amazon.redshift.jdbc42.Driver
spring.datasource.url= jdbc:redshift://redshift:5439/pocdb
spring.datasource.username=****
spring.datasource.password=***
异常帖子
Unable to determine jdbc url from datasource
Driver:org.postgresql.Driver@31da6b2e returned null for URL:jdbc:redshift://redshift:5439/pocdb
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:329) ~[tomcat-jdbc-8.5.11.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203) ~[tomcat-jdbc-8.5.11.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:732) [tomcat-jdbc-8.5.11.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:664) [tomcat-jdbc-8.5.11.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:479) [tomcat-jdbc-8.5.11.jar:na]
不知道我在这里错过了什么?
答案 0 :(得分:0)
发现了这个问题。它指的是老postgres司机。