简体   繁体   English

如何刷新速度模板

[英]How to refresh velocity templates

How to refresh velocity templates after given interval. 如何在给定间隔后刷新速度模板。 Let say i want it to automatically refresh after specified interval 假设我希望它在指定的间隔后自动刷新

Any help in this regard will be highly appreciated. 在这方面的任何帮助将受到高度赞赏。

try following; 尝试以下;

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 ); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM