feat(alerting): wire all alerting repository beans
AlertingBeanConfig now exposes 4 additional @Bean methods: alertInstanceRepository, alertSilenceRepository, alertNotificationRepository, alertReadRepository. AlertReadRepository takes only JdbcTemplate (no JSONB/ObjectMapper needed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user