【问题标题】:How to proper initialize the nvelocity engine?如何正确初始化速度引擎?
【发布时间】:2009-11-13 09:44:05
【问题描述】:

正如我在一些示例中看到的,并试图在整个velocity site 中理解,初始化速度引擎有三种方法:
- 使用默认配置:.Init()
- 使用默认配置,加上文件中的属性:.Init(string)
- 使用默认配置,加上集合中的属性:.Init(Commons.Collections.ExtendedProperties)

但我几乎没有找到关于这些工作原理的解释。例如,在我下载的应用中:

VelocityEngine engine = new VelocityEngine();
ExtendedProperties props = new ExtendedProperties();
props.AddProperty("file.resource.loader.path", new ArrayList(new string[] { ".", @".\Templates" }));
engine.Init(props);

除了显而易见的假设之外,什么是“file.resource.loader.path”?
我可以更改哪些其他属性,以及如何更改它们(我的意思是,使用 addproperty,或者如果有其他方法,请指定)?

【问题讨论】:

    标签: .net velocity nvelocity


    【解决方案1】:

    Here 是可用属性的列表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-01
      • 2010-11-11
      • 2021-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多