如何正确初始化nvelocity引擎?

时间:2009-11-12 13:32:23

标签: .net velocity nvelocity

正如我在一些例子中看到的那样,并试图在整个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,或者还有其他方法请指定)?

1 个答案:

答案 0 :(得分:1)

Here是可用属性列表。