@Configuration @ConditionalOnClass(value={, }) @EnableConfigurationProperties(value=RabbitProperties.class) public class RabbitAutoConfiguration extends Object
Auto-configuration
for RabbitTemplate
.
This configuration class is active only when the RabbitMQ and Spring AMQP client libraries are on the classpath.
Registers the following beans:
RabbitTemplate
if there is
no other bean of the same type in the context.CachingConnectionFactory
instance if there is no other bean of the same type in the
context.org.springframework.amqp.core.AmqpAdmin
instance as long as
spring.rabbitmq.dynamic=true.
The org.springframework.amqp.rabbit.connection.CachingConnectionFactory
honors
the following properties:
Modifier and Type | Class and Description |
---|---|
protected static class |
RabbitAutoConfiguration.RabbitConnectionFactoryCreator |
Constructor and Description |
---|
RabbitAutoConfiguration() |
@Bean @ConditionalOnMissingBean(value=) public AmqpAdmin amqpAdmin(CachingConnectionFactory connectionFactory)
@Bean @ConditionalOnMissingBean(value=) public RabbitTemplate rabbitTemplate()
Copyright © 2014. All rights reserved.