gpt4 book ai didi

velocity - 如何在严格模式下检查apache Velocity中是否定义了方法

转载 作者:行者123 更新时间:2023-12-02 21:46:28 24 4
gpt4 key购买 nike

Velocity Strict 模式不允许 $!field.extension,如何检查 getExtension() 是否是 $field 中定义的方法?

非常感谢!

最佳答案

速度工具 2 中有 ClassTool

This tool is meant to simplify reflective lookup of information about a Class and its Fields, Methods

您可以使用getMethods()函数获取所有类方法。

关于velocity - 如何在严格模式下检查apache Velocity中是否定义了方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19518532/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com