标签:servlet Servle date utils mtd comm 调用 attr setattr
方法调用:尝试在null上下文对象上调用方法***
示例:
Java代码:
httpServletRequest.setAttribute("commons", commons);//一些工具类和公共方法
Thyemleaf表达式:
${commons.fmtdate_en(archive.created)}
${T(com.juyss.utils.Commons).fmtdate_en(archive.created)}
${T(要调用的类的全类名).要调用的方法}
Thyemleaf报错: Method call: Attempted to call method *** on null context object
标签:servlet Servle date utils mtd comm 调用 attr setattr
原文地址:https://www.cnblogs.com/shmebluk/p/14184110.html