public static String sayHello(String name) {
return "HELLO " + name;
}
<s:property value="@com.xxx.util.Util@sayHello('tiantian')"/>
<s:property value="@org.hpin.workBillMgt.entity.enums.ServiceTypeEnum@BJ"/>
本文探讨了Struts框架中属性设置的方法,并通过具体代码示例展示了如何利用Struts框架进行属性值的注入,包括使用自定义工具类进行字符串拼接及枚举类型的属性设置。
public static String sayHello(String name) {
return "HELLO " + name;
}
<s:property value="@com.xxx.util.Util@sayHello('tiantian')"/>
<s:property value="@org.hpin.workBillMgt.entity.enums.ServiceTypeEnum@BJ"/>
288
1042

被折叠的 条评论
为什么被折叠?