Apache's Velocity — getTemplate(). Actually its allowing to pass the .vm file name , can i pass the string/object here? is there any method available to pass the string/object?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
look into the StringResourceLoader
This is a sample code that is working for me.
Velocity version: 1.7
I use log4j as a logger.
I searched for hours on the same question, finally found the unit test code that shows everything necessary.
http://svn.apache.org/repos/asf/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StringResourceLoaderRepositoryTestCase.java