Search in sources :

Example 1 with Primary

use of com.netflix.governator.annotations.binding.Primary in project micro-service by Lovnx.

the class NotifierConfiguration method remindingNotifier.

@Bean
@Primary
public RemindingNotifier remindingNotifier() {
    RemindingNotifier remindingNotifier = new RemindingNotifier(notifier);
    // 设定时间,5分钟提醒一次
    // remindingNotifier.setReminderPeriod(TimeUnit.MINUTES.toMillis(5));
    // 设定监控服务状态,状态改变为给定值的时候提醒
    remindingNotifier.setReminderStatuses(reminderStatuses);
    return remindingNotifier;
}
Also used : RemindingNotifier(de.codecentric.boot.admin.notify.RemindingNotifier) Primary(com.netflix.governator.annotations.binding.Primary) Bean(org.springframework.context.annotation.Bean)

Aggregations

Primary (com.netflix.governator.annotations.binding.Primary)1 RemindingNotifier (de.codecentric.boot.admin.notify.RemindingNotifier)1 Bean (org.springframework.context.annotation.Bean)1