aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
index efe72250..9603f826 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
@@ -49,10 +49,11 @@ import java.util.Map;
* if not provided, the factory will fall back on using
* {@link StringResourceRepositoryImpl} as the default.
* <pre>
- * resource.loader = string
- * string.resource.loader.description = Velocity StringResource loader
- * string.resource.loader.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader
- * string.resource.loader.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepositoryImpl
+ * resource.loaders = string
+ * resource.loader.string.description = Velocity StringResource loader
+ * resource.loader.string.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader
+ * resource.loader.string.repository.name = MyRepositoryName (optional, to avoid using the default repository)
+ * resource.loader.string.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepositoryImpl
* </pre>
* Resources can be added to the repository like this:
* <pre><code>
@@ -66,7 +67,7 @@ import java.util.Map;
* After this, the templates can be retrieved as usual.
* <br>
* <p>If there will be multiple StringResourceLoaders used in an application,
- * you should consider specifying a 'string.resource.loader.repository.name = foo'
+ * you should consider specifying a 'resource.loader.string.repository.name = foo'
* property in order to keep you string resources in a non-default repository.
* This can help to avoid conflicts between different frameworks or components
* that are using StringResourceLoader.
@@ -78,7 +79,7 @@ import java.util.Map;
* </p>
* <p>If you have concerns about memory leaks or for whatever reason do not wish
* to have your string repository stored statically as a class member, then you
- * should set 'string.resource.loader.repository.static = false' in your properties.
+ * should set 'resource.loader.string.repository.static = false' in your properties.
* This will tell the resource loader that the string repository should be stored
* in the Velocity application attributes. To retrieve the repository, do:
* <pre><code>
@@ -103,7 +104,7 @@ import java.util.Map;
* repo.magicallyAddSomeStringResources();
* velocityEngine.setApplicationAttribute("foo", repo);
* </code></pre>
- * Then, assuming the 'string.resource.loader.repository.name' property is
+ * Then, assuming the 'resource.loader.string.repository.name' property is
* set to 'some.name', the StringResourceLoader will use that already created
* repository, rather than creating a new one.
* </p>