类 RabbitTemplateConfigurer
java.lang.Object
org.springframework.boot.autoconfigure.amqp.RabbitTemplateConfigurer
Configure
RabbitTemplate with sensible defaults.- 从以下版本开始:
- 2.3.0
- 作者:
- Stephane Nicoll, Yanming Zhou
-
构造器概要
构造器构造器说明RabbitTemplateConfigurer(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties. -
方法概要
修饰符和类型方法说明voidconfigure(org.springframework.amqp.rabbit.core.RabbitTemplate template, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specifiedRabbitTemplate.protected final RabbitPropertiesvoidsetMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverterto use ornullif the out-of-the-box converter should be used.voidsetRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.
-
构造器详细资料
-
RabbitTemplateConfigurer
Creates a new configurer that will use the givenrabbitProperties.- 参数:
rabbitProperties- properties to use- 从以下版本开始:
- 2.6.0
-
-
方法详细资料
-
setMessageConverter
public void setMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverterto use ornullif the out-of-the-box converter should be used.- 参数:
messageConverter- theMessageConverter- 从以下版本开始:
- 2.6.0
-
setRetryTemplateCustomizers
public void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.- 参数:
retryTemplateCustomizers- the retry template customizers- 从以下版本开始:
- 2.6.0
-
getRabbitProperties
-
configure
public void configure(org.springframework.amqp.rabbit.core.RabbitTemplate template, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specifiedRabbitTemplate. The template can be further tuned and default settings can be overridden.- 参数:
template- theRabbitTemplateinstance to configureconnectionFactory- theConnectionFactoryto use
-