public class DifyRuntimeHolder extends AbstractRuntimeHolder
temporarylog, runtimes| 构造器和说明 |
|---|
DifyRuntimeHolder() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
destroy(String key) |
static DifyRuntimeHolder |
instance() |
DataRuntime |
reg(String key,
DifyClient client) |
DifyRuntime |
reg(String datasource,
DifyClient client,
DriverAdapter adapter)
注册运行环境
|
DataRuntime |
temporary(Object client,
String database,
DriverAdapter adapter)
注册数据源 子类覆盖 生成简单的DataRuntime不注册到spring
|
parseAdapterKey, parseCatalog, parseParamValue, parseSchemapublic static DifyRuntimeHolder instance()
public DataRuntime temporary(Object client, String database, DriverAdapter adapter) throws Exception
client - 数据源, 如DruidDataSource, MongoClient, es.DifyClientdatabase - 数据库, jdbc类型数据源不需要adapter - 如果确认数据库类型可以提供如 new MySQLAdapter(), 如果不提供则根据ds检测Exception - 异常 Exceptionpublic DataRuntime reg(String key, DifyClient client) throws Exception
Exceptionpublic DifyRuntime reg(String datasource, DifyClient client, DriverAdapter adapter) throws Exception
datasource - 数据源前缀client - DifyClientadapter - adapter 可以为空 第一次执行时补齐Exceptionpublic boolean destroy(String key)
Copyright © 2025. All rights reserved.