Velocity中没有null,那么怎么判断null呢 1、在velocity中,非null被认为是真的,所以,可以如下用: #if($!变量名) // 变量不为空的代码 #else // 变量为空的代码 #end