Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何启用 Velocity 引擎以尊重#macro 签名,以便如果我尝试在模板中调用宏示例:
#myTestMacro($arg1 $arg2)
定义时具有不同的签名示例:
#macro(myTestMacro $arg)
Velocity 足够聪明,可以抛出错误,所以我可以在上面的示例中捕获无效数量的参数?
在配置中,设置velocimacro.arguments.strict=true.
velocimacro.arguments.strict=true