JeecgBoot3.2.0 版本发布 [优化微服务模块]

This commit is contained in:
zhangdaiscott
2022-04-24 15:51:09 +08:00
parent 490f5696cf
commit 5dcb991dde
35 changed files with 103 additions and 41 deletions

View File

@ -2,6 +2,8 @@ package org.jeecg.modules.test.rabbitmq.constant;
/**
* 微服务单元测试常量定义
* @author: zyf
* @date: 2022/04/21
*/
public interface CloudConstant {

View File

@ -19,6 +19,8 @@ import io.swagger.annotations.ApiOperation;
/**
* RabbitMqClient发送消息
* @author: zyf
* @date: 2022/04/21
*/
@RestController
@RequestMapping("/sys/test")

View File

@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j;
/**
* 消息处理器【发布订阅】
* @author: zyf
* @date: 2022/04/21
*/
@Slf4j
@Component(CloudConstant.MQ_DEMO_BUS_EVENT)

View File

@ -21,6 +21,8 @@ import lombok.extern.slf4j.Slf4j;
*
* RabbitMq接受者1
* @RabbitListener声明类上一个类只能监听一个队列
* @author: zyf
* @date: 2022/04/21
*/
@Slf4j
@RabbitListener(queues = CloudConstant.MQ_JEECG_PLACE_ORDER)

View File

@ -17,6 +17,8 @@ import org.springframework.messaging.handler.annotation.Header;
*
* RabbitMq接受者2
* @RabbitListener声明类上一个类只能监听一个队列
* @author: zyf
* @date: 2022/04/21
*/
@Slf4j
@RabbitListener(queues = CloudConstant.MQ_JEECG_PLACE_ORDER)

View File

@ -16,6 +16,8 @@ import org.springframework.messaging.handler.annotation.Header;
*
* RabbitMq接受者3【我是处理人3】
* @RabbitListener声明类方法上一个类可以多监听多个队列
* @author: zyf
* @date: 2022/04/21
*/
@Slf4j
@RabbitComponent(value = "helloReceiver3")

View File

@ -14,6 +14,11 @@ import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
/**
* 定义接收者可以定义N个接受者消息会均匀的发送到N个接收者中
* @author: zyf
* @date: 2022/04/21
*/
@Slf4j
@RabbitListener(queues = CloudConstant.MQ_JEECG_PLACE_ORDER_TIME)
@RabbitComponent(value = "helloTimeReceiver")