springboot怎么配置velocity.properties文件呢?
"
统一在application.properties配置:
# VELOCITY TEMPLATES (VelocityAutoConfiguration) spring.velocity.allow-request-override=false # Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. spring.velocity.allow-session-override=false # Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. spring.velocity.cache= # Enable template caching. spring.velocity.charset=UTF-8 # Template encoding. spring.velocity.check-template-location=true # Check that the templates location exists. spring.velocity.content-type=text/html # Content-Type value. spring.velocity.date-tool-attribute= # Name of the DateTool helper object to expose in the Velocity context of the view. spring.velocity.enabled=true # Enable MVC view resolution for this technology. spring.velocity.expose-request-attributes=false # Set whether all request attributes should be added to the model prior to merging with the template. spring.velocity.expose-session-attributes=false # Set whether all HttpSession attributes should be added to the model prior to merging with the template. spring.velocity.expose-spring-macro-helpers=true # Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". spring.velocity.number-tool-attribute= # Name of the NumberTool helper object to expose in the Velocity context of the view. spring.velocity.prefer-file-system-access=true # Prefer file system access for template loading. File system access enables hot detection of template changes. spring.velocity.prefix= # Prefix that gets prepended to view names when building a URL. spring.velocity.properties.*= # Additional velocity properties. spring.velocity.request-context-attribute= # Name of the RequestContext attribute for all views. spring.velocity.resource-loader-path=classpath:/templates/ # Template path. spring.velocity.suffix=.vm # Suffix that gets appended to view names when building a URL. spring.velocity.toolbox-config-location= # Velocity Toolbox config location. For instance `/WEB-INF/toolbox.xml` spring.velocity.view-names= # White list of view names that can be resolved.
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。