vars = BeanWrapper.of(target).findMapValuesForce();
+ return defaultTemplate().parseTemplate(template, vars);
}
/**
diff --git a/uno-core/src/main/java/cc/allio/uno/core/util/template/ExpressionTemplateNavigator.java b/uno-core/src/main/java/cc/allio/uno/core/util/template/ExpressionTemplateNavigator.java
new file mode 100644
index 00000000..2ac83ce9
--- /dev/null
+++ b/uno-core/src/main/java/cc/allio/uno/core/util/template/ExpressionTemplateNavigator.java
@@ -0,0 +1,37 @@
+package cc.allio.uno.core.util.template;
+
+import cc.allio.uno.core.api.OptionalContext;
+import cc.allio.uno.core.util.template.internal.PlaceholderExpressionTemplate;
+import cc.allio.uno.core.util.template.mvel.MVELExpressionTemplate;
+import lombok.Getter;
+
+/**
+ * compatible {@link PlaceholderExpressionTemplate} and new mvel {@link MVELExpressionTemplate}
+ * if {@link Tokenizer#AT_BRACE} then use {@link MVELExpressionTemplate} otherwise {@link PlaceholderExpressionTemplate}
+ *
+ * @author j.x
+ * @date 2024/5/3 21:32
+ * @since 1.1.9
+ */
+public class ExpressionTemplateNavigator implements ExpressionTemplate {
+
+ private final ExpressionTemplate internal;
+ @Getter
+ private final Tokenizer tokenizer;
+
+ public ExpressionTemplateNavigator(Tokenizer tokenizer, Object... args) {
+ if (Tokenizer.AT_BRACE == tokenizer) {
+ this.internal = new MVELExpressionTemplate();
+ } else {
+ Boolean langsym = OptionalContext.immutable(args).getTypeFirst(Boolean.class).orElse(false);
+ this.internal = new PlaceholderExpressionTemplate(tokenizer, langsym);
+ }
+ this.tokenizer = tokenizer;
+ }
+
+
+ @Override
+ public String parseTemplate(String template, TemplateContext context) {
+ return internal.parseTemplate(template, context);
+ }
+}
diff --git a/uno-core/src/main/java/cc/allio/uno/core/util/template/TemplateContext.java b/uno-core/src/main/java/cc/allio/uno/core/util/template/TemplateContext.java
new file mode 100644
index 00000000..bb6e227b
--- /dev/null
+++ b/uno-core/src/main/java/cc/allio/uno/core/util/template/TemplateContext.java
@@ -0,0 +1,51 @@
+package cc.allio.uno.core.util.template;
+
+import cc.allio.uno.core.api.OptionalContext;
+import cc.allio.uno.core.type.Types;
+import com.google.common.collect.Maps;
+import lombok.Getter;
+import org.springframework.context.ApplicationContext;
+
+import java.util.Map;
+import java.util.Optional;
+
+/**
+ * parse template for context
+ *
+ * @author j.x
+ * @date 2024/5/3 20:12
+ * @since 1.1.9
+ */
+public class TemplateContext implements OptionalContext {
+
+ final Map vars = Maps.newConcurrentMap();
+
+ @Getter
+ final Map inputs = Maps.newConcurrentMap();
+
+ @Override
+ public Optional