Spring velocity
默认情况下,velocity macro文件修改没有被应用服务器检测,必须重启才能生效。 Spring web.xml contextConfigLocation配置包含属性文件mvc-config.xml dispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/mvc-config.xml /WEB-INF/alert-config.xml 1 mvc-config.xml部分内容如下: WEB-INF/velocity/ gb2312 gb2312 text/html;charset=gb2312 false 1 true templates.vm org.apache.velocity.runtime.log.SimpleLog4JLogSystem com.ali true true false true .vm true true true dateTool Velocity文件包括库文件templates.vm都放在WEB-INF/velocity/ 确保velocity文件被修改都立即重新扫描,关键的参数: false 1 true 在index.vm上通过: #parse("templates.vm")引入velocity模版。