update ds_pgvector
This commit is contained in:
@@ -13,9 +13,6 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI 聊天配置类
|
* AI 聊天配置类
|
||||||
* @author ThinkGem
|
* @author ThinkGem
|
||||||
@@ -55,10 +52,9 @@ public class CmsAiChatConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
@ConditionalOnProperty(name = "jdbc.ds_pgvector.type")
|
@ConditionalOnProperty(name = "jdbc.ds_pgvector.type")
|
||||||
public JdbcTemplate pgVectorStoreJdbcTemplate() throws SQLException {
|
public JdbcTemplate pgVectorStoreJdbcTemplate() {
|
||||||
DataSource dataSource = DataSourceHolder.getRoutingDataSource()
|
return DataSourceHolder.getRoutingDataSource()
|
||||||
.createDataSource("ds_pgvector");
|
.getJdbcTemplate("ds_pgvector");
|
||||||
return new JdbcTemplate(dataSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ spring:
|
|||||||
# username: postgres
|
# username: postgres
|
||||||
# password: postgres
|
# password: postgres
|
||||||
# testSql: SELECT 1
|
# testSql: SELECT 1
|
||||||
|
# pool:
|
||||||
|
# init: 0
|
||||||
|
# minIdle: 0
|
||||||
|
# breakAfterAcquireFailure: true
|
||||||
|
|
||||||
# ========= ES 向量数据库连接配置 =========
|
# ========= ES 向量数据库连接配置 =========
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user