Skip to content

Commit

Permalink
初始化AlarmService时,需要调用start方法,否则MailAlarmService的mailSender属性为null,发送邮…
Browse files Browse the repository at this point in the history
…件失败。

AlarmTest类的testMail用例也是类似的写法。
  • Loading branch information
gjf281 committed Oct 10, 2016
1 parent 17a3660 commit 151d0be
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ private AlarmService initAlarmService() {
alarmService.setEmailUsername(config.getString("yugong.alarm.email.username"));
alarmService.setStmpPort(config.getInt("yugong.alarm.email.stmp.port", 465));
alarmService.setSslSupport(config.getBoolean("yugong.alarm.email.ssl.support", true));
alarmService.start();
return alarmService;
} else {
return new LogAlarmService();
Expand Down

0 comments on commit 151d0be

Please sign in to comment.