我正在尝试使用Spring-JDBC连接到Presto,并且我正在使用Hikari CP作为数据源.
这是我的配置:
@Bean
public DataSource myDataSource() {
HikariDataSource hikariDataSource = new HikariDataSource();
hikariDataSource.setDriverClassName("com.facebook.presto.jdbc.PrestoDriver");
hikariDataSource.setJdbcUrl("xxxxxxx");
hikariDataSource.setMaximumPoolSize(10);
hikariDataSource.setMinimumIdle(5);
hikariDataSource.setIdleTimeout(10000);
hikariDataSource.setConnectionTimeout(60000);
hikariDataSource.setUsername("xxxx");
hikariDataSource.setPassword("xxxx");
hikariDataSource.setAutoCommit(false);
return hikariDataSource;
}
在服务类中自动装配数据源时,出现以下错误:
java.sql.SQLFeatureNotSupportedException: Disabling auto-commit mode not supported
at com.facebook.presto.jdbc.PrestoConnection.setAutoCommit(PrestoConnection.java:126) ~[presto-jdbc-0.163.jar:0.163]
依赖关系:对于Springboot base 1.5.10.RELEASE
org.springframework.boot
spring-boot-starter-jdbc
com.zaxxer
HikariCP
2.7.8
com.facebook.presto
presto-jdbc
0.163