I have a resource (velocity template) which I'd like to be able to swap during development. However,
getClass().getClassLoader().getResourceAsStream()
seems to cache the template. Is there a way to disable this besides using a file loader instead of the class loader?
See if something like this helps (exception handling omitted):
To avoid caching you can use:
It would be equal to using
URLResourceLoader
for Velocity instead ofClasspathResourceLoader
I suppose. I would just go with a file loader.