velocity.properties文件示例:
#文字编码
input.encoding = utf-8
output.encoding = utf-8
default.contentType = text/html; charset = utf-8
#循环计数初始值
directive.foreach.counter.initial.value = 0
resource.loader = file, macroLibrary
file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
file.resource.loader.path = path-to-templates
file.resource.loader.cache = false
file.resource.loader.modificationCheckInterval = 0
macroLibrary.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
#宏配置
velocimacro.library = path-to-library.vm
velocimacro.permissions.allow.inline = true
velocimacro.permissions.allow.inline.to.replace.global = false
velocimacro.permissions.allow.inline.local.scope = false
velocimacro.context.localscope = false
velocimacro.library.autoreload = true
#模版配置
tools.view.servlet.error.template = path-to-error-template
tools.view.servlet.layout.directory = path-to-folder
#文字编码
input.encoding = utf-8
output.encoding = utf-8
default.contentType = text/html; charset = utf-8
#循环计数初始值
directive.foreach.counter.initial.value = 0
resource.loader = file, macroLibrary
file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
file.resource.loader.path = path-to-templates
file.resource.loader.cache = false
file.resource.loader.modificationCheckInterval = 0
macroLibrary.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
#宏配置
velocimacro.library = path-to-library.vm
velocimacro.permissions.allow.inline = true
velocimacro.permissions.allow.inline.to.replace.global = false
velocimacro.permissions.allow.inline.local.scope = false
velocimacro.context.localscope = false
velocimacro.library.autoreload = true
#模版配置
tools.view.servlet.error.template = path-to-error-template
tools.view.servlet.layout.directory = path-to-folder
没有评论:
发表评论