From e28308b4711eb63ed71030f936fc06aa65d04c89 Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Sun, 19 Apr 2026 19:14:40 +0800 Subject: [PATCH] feat(starter): bind liteflow.agent into LiteflowConfig via LiteflowProperty Co-Authored-By: Claude Opus 4.7 --- .../liteflow/springboot/LiteflowProperty.java | 12 ++++++++++++ .../config/LiteflowPropertyAutoConfiguration.java | 1 + 2 files changed, 13 insertions(+) diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java index cd3887b24..df0145da0 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/LiteflowProperty.java @@ -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; + } } diff --git a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/config/LiteflowPropertyAutoConfiguration.java b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/config/LiteflowPropertyAutoConfiguration.java index 20e06052f..c6af848b1 100644 --- a/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/config/LiteflowPropertyAutoConfiguration.java +++ b/liteflow-spring-boot-starter/src/main/java/com/yomahub/liteflow/springboot/config/LiteflowPropertyAutoConfiguration.java @@ -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; }