fix: use concrete ClickHouseDataSource return type to avoid bean ambiguity
This commit is contained in:
@@ -21,6 +21,7 @@ public class AsyncConfig {
|
||||
@Bean(name = "deploymentExecutor")
|
||||
public Executor deploymentExecutor() {
|
||||
var executor = new ThreadPoolTaskExecutor();
|
||||
// Core == max: no burst threads. Deployments beyond pool size queue (up to 25).
|
||||
executor.setCorePoolSize(runtimeConfig.getDeploymentThreadPoolSize());
|
||||
executor.setMaxPoolSize(runtimeConfig.getDeploymentThreadPoolSize());
|
||||
executor.setQueueCapacity(25);
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import com.clickhouse.jdbc.ClickHouseDataSource;
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -15,7 +14,7 @@ public class ClickHouseConfig {
|
||||
private String url;
|
||||
|
||||
@Bean(name = "clickHouseDataSource")
|
||||
public DataSource clickHouseDataSource() throws Exception {
|
||||
public ClickHouseDataSource clickHouseDataSource() throws Exception {
|
||||
var properties = new Properties();
|
||||
return new ClickHouseDataSource(url, properties);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user