InstanceRenewListener.java 692 字节
Newer Older
1 2
package com.microservice.skeleton.register.listener;

M
ManongJu 已提交
3
import lombok.extern.slf4j.Slf4j;
4 5 6 7 8 9 10 11 12 13
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRenewedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;

/**
 * Created by Mr.Yangxiufeng on 2017/12/9.
 * Time:13:48
 * ProjectName:Mirco-Service-Skeleton
 */
@Configuration
M
ManongJu 已提交
14
@Slf4j
15 16 17
public class InstanceRenewListener implements ApplicationListener<EurekaInstanceRenewedEvent> {
    @Override
    public void onApplicationEvent(EurekaInstanceRenewedEvent event) {
M
ManongJu 已提交
18
        log.info("心跳检测服务:{}" ,event.getInstanceInfo().getAppName());
19 20
    }
}