velocity.exception.ParseErrorException: Encountered "<EOF>"
Was expecting one of:
"(" ...
<RPAREN> ...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"##" ...
"\\\\" ...
"\\" ...
<TEXT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<END> ...
<IF_DIRECTIVE> ...
<STOP_DIRECTIVE> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<WORD> ...
<BRACKETED_WORD> ...
<IDENTIFIER> ...
<DOT> ...
"{" ...
"}" ...
检查了一个多小时,才发现居然是vm文件中有一个#if没有用#end关闭。
加上之后,问题解决。
分享到:
相关推荐
基于Velocity的渲染器/生成器(Velocity based renderer/generator)<br>15.3. 映射文件生成器(Mapping File Generation)<br>15.3.1. 运行此工具<br>16. 示例:父子关系(Parent Child Relationships)<br>16.1. 关于...
基于Velocity的渲染器/生成器(Velocity based renderer/generator)<br>15.3. 映射文件生成器(Mapping File Generation)<br>15.3.1. 运行此工具<br>16. 示例:父子关系(Parent Child Relationships)<br>16.1. 关于...
<servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> <url-pattern>*.vm</url-pattern> </servlet-...
利用velocity来定义动画序列,可以直接使用velocity.js中预定义动画开发自己的网页动画,也可以利用velocity.js自定义动画
SpringBoot1.5以上版本兼容被抛弃的velocity,详情说明见项目README.md。 # springboot1.5.x+ ...3.不想写java类配置就直接@ImportResource({"classpath:velocity.xml"})原来的xml配置 4.其他原来是啥就是啥开工
spring-hibernate-dwr做的AJAX操作CRUD实例<br>...1.3.jar<br>poi-2.5.1.jar<br>cos.jar<br>velocity-1.5.jar<br>velocity-tools-view-1.3.jar<br>commons-codec.jar<br>dwr-2.0.rc2.jar<br>asm.jar<br>files.lst<br>
使用velocity.js开发序列动画,需要同时引入velocity.ui.min.js库文件
完全由Spring接管DWR AJAX处理(不需要配置dwr.xml)等技术点<br>源码在/mytest/WEB-INF/src下<br>Winxp sp3+JDK1.6+Tomcat 6.0下运行通过<br>因文件长度限制,未加入相关类库,请自行加入,需要的类库有:<br>dom.jar...
<groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-...
<spring.version>4.0.2.RELEASE</spring.version> <mybatis.version>3.2.6</mybatis.version> <slf4j.version>1.7.7</slf4j.version> <log4j.version>1.2.17</log4j.version> </properties> <dependencies> <!...
<groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> <version>1.7</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-...
p.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); VelocityEngine ve = new VelocityEngine(); ve.init(p); Template t = ve.getTemplate...
Tricks of the Windows video Game Programming<br><br>PART I Windows Programming Foundations 7<br>1 Journey into the Abyss 9<br>A Little History.............................................................
赠送jar包:velocity-engine-core-2.3.jar; 赠送原API文档:velocity-engine-core-2.3-javadoc.jar; 赠送源代码:velocity-engine-core-2.3-sources.jar; 赠送Maven依赖信息文件:velocity-engine-core-2.3.pom;...
Map<String, Object> model = new HashMap<>(); model.put("error", "Invalid credentials"); return new ModelAndView("login.vm", model); } } } ``` 这里,我们假设有一个 `UserService` 类来验证用户名和...
- `<#macro name param1 param2 ...><#nested param></#macro>`:定义宏,`<#nested param>`允许在宏内部调用其他模板片段。 - `<#function name param1 param2><#return val></#function>`:定义函数,返回值为`...
Map<String, Object> model = new HashMap<>(); model.put("name", "Velocity"); return new ModelAndView("hello.vm", model); } ``` 这样,当用户访问/hello时,Spring会使用Velocity渲染"hello.vm"模板,并...
* 条件判断: `<#if condition><#elseif condition><#else></#if>` * 遍历Hash表或者序列: `<#list hash_or_seq as var></#list>` * 宏: `<#macro name param1 param2 ... ><#nested param></#macro>` * 函数: `...
import org.apache.velocity.app.VelocityEngine; @Controller public class PdfController { @GetMapping("/generatePdf") @ResponseBody public void generatePdf(HttpServletResponse response) throws ...
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <property name="velocityProperties"> <props> <prop key="input.encoding">GBK</prop> <prop key="file....