Commit c410be8b by Johannes Edmeier

Remove @OnCondinalProperty("*.enabled") from Notifier beans

To make custom NotifierConfigurations easier and less error prone we now instantiate the Notifier Beans regardless of the corresponding enabled property closes #402
parent 3dbea6bf
......@@ -116,7 +116,6 @@ public class NotifierConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.boot.admin.notify.mail", name = "enabled", matchIfMissing = true)
@ConfigurationProperties("spring.boot.admin.notify.mail")
public MailNotifier mailNotifier() {
return new MailNotifier(mailSender);
......@@ -130,7 +129,6 @@ public class NotifierConfiguration {
public static class PagerdutyNotifierConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.boot.admin.notify.pagerduty", name = "enabled", matchIfMissing = true)
@ConfigurationProperties("spring.boot.admin.notify.pagerduty")
public PagerdutyNotifier pagerdutyNotifier() {
return new PagerdutyNotifier();
......@@ -144,7 +142,6 @@ public class NotifierConfiguration {
public static class HipchatNotifierConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.boot.admin.notify.hipchat", name = "enabled", matchIfMissing = true)
@ConfigurationProperties("spring.boot.admin.notify.hipchat")
public HipchatNotifier hipchatNotifier() {
return new HipchatNotifier();
......@@ -158,7 +155,6 @@ public class NotifierConfiguration {
public static class SlackNotifierConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.boot.admin.notify.slack", name = "enabled", matchIfMissing = true)
@ConfigurationProperties("spring.boot.admin.notify.slack")
public SlackNotifier slackNotifier() {
return new SlackNotifier();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment