我正在使用 Rythm (yup no h),一个 Java 模板引擎。
这个想法是替换模板文件(例如文本文件)中的占位符。
就我而言,我正在处理 JSON。要调用 Rythm 引擎,我只需要做:
Rythm.render("my @var1 content and my email is joe@acme (or call @var2)", "foo", "bar");
输出是
[DEBUG] org.rythmengine.RythmEngine:69 - Rythm-1.1.1- SNAPSHOT started in prod mode
my foo content and my email is joebar (or call )
[ INFO] org.rythmengine.RythmEngine:84 - Shutting down Rythm Engine: [re-wZ5]
如您所见,该值"bar"
转到了@acme,引擎将其误认为是占位符。我怎样才能逃脱@符号?
谢谢