package org.onap.aai.kafka;
import org.onap.aai.domain.deltaEvent.DeltaEvent;
-import org.springframework.stereotype.Service;
-@Service
public interface DeltaProducer {
public void sendNotification(DeltaEvent notificationEvent);
}
import org.onap.aai.domain.deltaEvent.DeltaEvent;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
-import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
-@Service
@RequiredArgsConstructor
public class DeltaProducerService implements DeltaProducer {
import org.onap.aai.domain.notificationEvent.NotificationEvent;
import org.onap.aai.rest.notification.UEBNotification;
-import org.springframework.stereotype.Service;
-@Service
public interface NotificationProducer {
public void sendNotification(NotificationEvent notificationEvent);
public void sendUEBNotification(UEBNotification uebNotification);
import org.onap.aai.rest.notification.UEBNotification;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
-import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
-@Service
@RequiredArgsConstructor
public class NotificationProducerService implements NotificationProducer {
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource(value = "file:${schema.ingest.file}", ignoreResourceNotFound = true)
public class ConfigConfiguration {
- @Bean(name = "schemaConfigVersions")
+ @Primary
@ConditionalOnMissingBean
+ @Bean(name = "schemaConfigVersions")
public SchemaConfigVersions schemaConfigVersions() {
return new SchemaConfigVersions();
}
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.stereotype.Component;
-@Component("schemaConfigVersions")
-@ConditionalOnExpression("'${schema.translator.list:config}'.contains('config') || '${schema.service.versions.override:false}'.equals('true')")
-@PropertySource(value = "classpath:schema-ingest.properties", ignoreResourceNotFound = true)
-@PropertySource(value = "file:${schema.ingest.file}", ignoreResourceNotFound = true)
public class SchemaConfigVersions extends SchemaVersions {
@Value("#{'${schema.version.list:''}'.split(',')}")