mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-12 10:31:04 +08:00
feat(starter): bind liteflow.agent into LiteflowConfig via LiteflowProperty
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,10 @@ public class LiteflowProperty {
|
||||
@NestedConfigurationProperty
|
||||
private ChainCacheProperty chainCache;
|
||||
|
||||
// Agent配置
|
||||
@NestedConfigurationProperty
|
||||
private com.yomahub.liteflow.property.agent.AgentConfig agent;
|
||||
|
||||
public static class ChainCacheProperty {
|
||||
// 是否启用规则缓存
|
||||
private Boolean enabled;
|
||||
@@ -378,4 +382,12 @@ public class LiteflowProperty {
|
||||
public void setEnableVirtualThread(boolean enableVirtualThread) {
|
||||
this.enableVirtualThread = enableVirtualThread;
|
||||
}
|
||||
|
||||
public com.yomahub.liteflow.property.agent.AgentConfig getAgent() {
|
||||
return agent;
|
||||
}
|
||||
|
||||
public void setAgent(com.yomahub.liteflow.property.agent.AgentConfig agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public class LiteflowPropertyAutoConfiguration {
|
||||
liteflowConfig.setEnableVirtualThread(property.isEnableVirtualThread());
|
||||
liteflowConfig.setChainCacheEnabled(property.getChainCache().isEnabled());
|
||||
liteflowConfig.setChainCacheCapacity(property.getChainCache().getCapacity());
|
||||
liteflowConfig.setAgent(property.getAgent());
|
||||
return liteflowConfig;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user