@Configuration @AutoConfigureBefore(value=org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration.class) public class RabbitMQConfig extends Object
| 构造器和说明 |
|---|
RabbitMQConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.amqp.support.converter.MessageConverter |
customMessageConverter()
自定义消息转换器,处理JSON和文本消息
|
org.springframework.amqp.rabbit.core.RabbitTemplate |
rabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
设置RabbitTemplate的消息转换器为自定义消息转换器
|
@Bean public org.springframework.amqp.support.converter.MessageConverter customMessageConverter()
@Bean public org.springframework.amqp.rabbit.core.RabbitTemplate rabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
connectionFactory - Copyright © 2025. All rights reserved.