use of org.apache.camel.component.nats.NatsComponent in project camel by apache.
the class NatsComponentAutoConfiguration method configureNatsComponent.
@Lazy
@Bean(name = "nats-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(NatsComponent.class)
public NatsComponent configureNatsComponent(CamelContext camelContext) throws Exception {
NatsComponent component = new NatsComponent();
component.setCamelContext(camelContext);
return component;
}
Also used :
NatsComponent(org.apache.camel.component.nats.NatsComponent)
Lazy(org.springframework.context.annotation.Lazy)
ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)
ConditionalOnClass(org.springframework.boot.autoconfigure.condition.ConditionalOnClass)
ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean)
ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)
Bean(org.springframework.context.annotation.Bean)