我传递给速度模板逗号分隔值,并在开始时收到 ParseErrorException。如何解决?
#set ($test=StringUtils.split($filterFieldCSV,","))
#foreach ( $filterField in $test )
<!-- process something here -->
#end
Caused by: org.apache.velocity.exception.ParseErrorException: Encountered "StringUtils" at t-50[line 3, column 12] Was expecting one of:
"[" ...
"{" ...
"(" ...
<WHITESPACE> ...
<STRING_LITERAL> ...
"true" ...
"false" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<IDENTIFIER> ...
"{" ...
<LOGICAL_NOT> ...
at org.apache.velocity.Template.process(Template.java:141) at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380) at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:401)