Take notoce that this loader does not allow for modification detection: + /// Use Velocity's default FileResourceLoader for File resources. + /// + ///
Expects "spring.resource.loader" and "spring.resource.loader.path"
+ /// application attributes in the Velocity runtime: the former of type
+ /// IResourceLoader, the latter a String.
+ ///
The optional "ConfigLocation" property sets the location of the Velocity + /// properties file, within the current application. Velocity properties can be + /// overridden via "VelocityProperties", or even completely specified locally, + /// avoiding the need for an external properties file. + /// + ///
The "ResourceLoaderPath" property can be used to specify the Velocity + /// resource loader path via Spring's Resource abstraction, possibly relative + /// to the Spring application context. + /// + ///
If "OverrideLogging" is true (the default), the VelocityEngine will be + /// configured to log via Commons Logging, that is, using the Spring-provided + /// "CommonsLoggingLogSystem" as log system. + /// + ///
The simplest way to use this class is to specify a ResourceLoaderPath + /// property; the VelocityEngine typically then does not need any further + /// configuration. + /// + ///
When populated via a String, standard URLs like "file:" and "assembly:" + /// pseudo URLs are supported, as understood by ResourceLoader. Allows for + /// relative paths when running in an ApplicationContext. + ///
Will define a path for the default Velocity resource loader with the name
+ /// "file". If the specified resource cannot be resolved to a java.io.File,
+ /// a generic SpringResourceLoader will be used under the name "spring", without
+ /// modification detection.
+ ///
Take notice that resource caching will be enabled in any case. With the file + /// resource loader, the last-modified timestamp will be checked on access to + /// detect changes. With SpringResourceLoader, the resource will be cached + /// forever (for example for class path resources). + ///
To specify a modification check interval for files, use Velocity's + /// standard "file.resource.loader.modificationCheckInterval" property. By default, + /// the file timestamp is checked on every access (which is surprisingly fast). + /// Of course, this just applies when loading resources from the file system. + ///
To enforce the use of SpringResourceLoader, i.e. to not resolve a path + /// as file system resource in any case, turn off the "preferFileSystemAccess" + /// flag. See the latter's javadoc for details. + ///
If this is enabled, VelocityEngineFactory will try to resolve the + /// specified "resourceLoaderPath" as file system resource (which will work + /// for expanded class path resources and ServletContext resources too). + ///
Default is "true". Turn this off to always load via SpringResourceLoader + /// (i.e. as stream, without hot detection of template changes), which might + /// be necessary if some of your templates reside in an expanded classes + /// directory while others reside in jar files. + ///
Called by
+ /// CreateVelocityEngine()
+ ///
Called by CreateVelocityEngine().
+ ///
Called by InitVelocityResourceLoader.
+ ///
Called by CreateVelocityEngine()
+ ///
When using this method to prepare a text for a mail to be sent with Spring's + /// mail support, consider wrapping VelocityException in MailPreparationException. + ///
When using this method to prepare a text for a mail to be sent with Spring's + /// mail support, consider wrapping VelocityException in MailPreparationException. + ///