diff --git a/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/config/AlertingBeanConfig.java b/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/config/AlertingBeanConfig.java index c14057eb..55ef6537 100644 --- a/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/config/AlertingBeanConfig.java +++ b/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/config/AlertingBeanConfig.java @@ -1,7 +1,7 @@ package com.cameleer.server.app.alerting.config; -import com.cameleer.server.app.alerting.storage.PostgresAlertRuleRepository; -import com.cameleer.server.core.alerting.AlertRuleRepository; +import com.cameleer.server.app.alerting.storage.*; +import com.cameleer.server.core.alerting.*; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -14,4 +14,24 @@ public class AlertingBeanConfig { public AlertRuleRepository alertRuleRepository(JdbcTemplate jdbc, ObjectMapper om) { return new PostgresAlertRuleRepository(jdbc, om); } + + @Bean + public AlertInstanceRepository alertInstanceRepository(JdbcTemplate jdbc, ObjectMapper om) { + return new PostgresAlertInstanceRepository(jdbc, om); + } + + @Bean + public AlertSilenceRepository alertSilenceRepository(JdbcTemplate jdbc, ObjectMapper om) { + return new PostgresAlertSilenceRepository(jdbc, om); + } + + @Bean + public AlertNotificationRepository alertNotificationRepository(JdbcTemplate jdbc, ObjectMapper om) { + return new PostgresAlertNotificationRepository(jdbc, om); + } + + @Bean + public AlertReadRepository alertReadRepository(JdbcTemplate jdbc) { + return new PostgresAlertReadRepository(jdbc); + } }