Skip to content

field.name.prefix

设置字段名称的前缀。

用法

properties
field.name.prefix=groovy:'''
if (!fieldContext) return null
def parentPath = tool.substringBeforeLast(fieldContext.path(),".")
return session.get("field.prefix",parentPath)
'''

通常与 Jackson 的 @JsonUnwrapped 注解配合使用,为展开的字段添加前缀。

另见

基于 Apache-2.0 许可发布