赞
踩
- private List<PreBusinessInterceptor> preList;
-
- private List<PostBusinessInterceptor> postList;
- <bean id="interceptorPipeLine" class="com.jd.ept.open.router.interceptor.InterceptorPipeLine">
- <property name="preList">
- <list>
- <!-- 公共拦截-->
- <ref bean="systemRateLimiterInterceptor"/>
- <ref bean="systemParamValidInterceptor"/>
- <ref bean="appCountPerMinuteRateLimiterInterceptor"/>
for (PreBusinessInterceptor interceptor : preList) {}
监控机器是否存活,每5分钟发送一次心跳。
实现思路:
- @Scheduled(cron = "45 0/5 * * * ? ") //每5分钟执行一次
- @Override
- public void afterPropertiesSet() throws Exception {
- try {
- registerService.refreshSysInfo(UmpConstant.APP_NAME, SystemUtil.getLocalhostIP());
- }catch(Exception e) {
- logger.error("afterPropertiesSet()",e);
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。