Java 如何刷新velocity模板
如何在给定间隔后刷新速度模板。比如说,我希望它自动运行 在指定的时间间隔后刷新 我们将非常感谢您在这方面提供的任何帮助。请尝试以下内容:Java 如何刷新velocity模板,java,velocity,Java,Velocity,如何在给定间隔后刷新速度模板。比如说,我希望它自动运行 在指定的时间间隔后刷新 我们将非常感谢您在这方面提供的任何帮助。请尝试以下内容: Properties templateProps = new Properties(); templateProps.setProperty( "file.resource.loader.modificationCheckInterval", 60); // This is in seconds templateProps.setProperty( "fil
Properties templateProps = new Properties();
templateProps.setProperty( "file.resource.loader.modificationCheckInterval", 60); // This is in seconds
templateProps.setProperty( "file.resource.loader.cache", "true" );
Velocity.init( templateProps );
刷新velocity模板是什么意思?我的意思是如果我更改其中的文本。它应该反映在下一个合并中。如果您希望在外部进行配置,还可以使用
velocity.properties
文件。