优化监听事件加载,对Cloud应用更友好。

This commit is contained in:
thinkgem
2019-07-24 23:09:18 +08:00
parent 687d11fecb
commit fa5523650c

View File

@@ -39,8 +39,9 @@ public class CacheController extends BaseController {
@PostConstruct
public void postConstruct(){
String rebel = System.getProperty("rebel.base");
if (StringUtils.isNotBlank(rebel)){
logger.debug("JRebel: 清理系统缓存...");
if (StringUtils.isNotBlank(rebel) && Global
.getPropertyToBoolean("spring.cache.isClusterMode", "false")){
logger.info("JRebel: Cache clear...");
CacheUtils.clearCache();
}
}