java - changes in velocity template to reflect without server restart -
Is there a way to automatically show changes made to VM files without automatically restarting the server? I am in development phase and I have a lot of changes. I am new to Velocity templates and therefore it would be very useful if someone could suggest the same method. I try to use the following attributes, but it is not working using the badge server
. & Lt; Beam id = "velocityEngine" class = "org.springframework.ui.velocity.VelocityEngineFactoryBean" & gt; & Lt; Property Name = "velocityProperties" & gt; & Lt; Price & gt; Source.loader = class class.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader velocimacro.library.autoreload = true class.resource.loader.cache = false velocimacro.permissions.allow.inline. To.replace.global = true & lt; / Value & gt; & Lt; / Property & gt; & Lt; / Bean & gt; If my understanding is correct, then you have your velocity template (vm extension) on your server But if we look at, if you should instead go for "file" oriented properties
. & Lt; Beam id = "velocityEngine" class = "org.springframework.ui.velocity.VelocityEngineFactoryBean" & gt; & Lt; Property Name = "velocityProperties" & gt; & Lt; Price & gt; Source.loader = file file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader velocimacro.library.autoreload = true file.resource.loader.cache = true file.resource.loader.path = / Web-INF / ideas velocimacro.permissions.allow.inline.to.replace.global = true file.resource.loader.modificationCheckInterval = 2 & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; / Bean & gt; Make sure your idea path is correct ( file.resource.loader.path ). I added file.resource.loader.modificationCheckInterval because you are caching the templates, you should give the number of seconds between two checks.
Comments
Post a Comment