3.2.0-beta,重构很大:升级springboot2.6.6、spring-cloud-alibaba 2021.1、mybatisplus3.5.1、代码规范部分重构

This commit is contained in:
zhangdaiscott
2022-04-18 09:37:28 +08:00
parent d0b68919b3
commit 69ecb39c9e
487 changed files with 9754 additions and 2928 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-cloud-test</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<description>消息队列测试模块</description>

View File

@ -17,16 +17,25 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* RabbitMqClient发送消息
*/
@RestController
@RequestMapping("/sys/test")
@Api(tags = "【微服务】单元测试")
@Api(tags = "【微服务】MQ单元测试")
public class JeecgMqTestController {
@Autowired
private RabbitMqClient rabbitMqClient;
/**
* 测试方法快速点击发送MQ消息
* 观察三个接受者如何分配处理消息HelloReceiver1、HelloReceiver2、HelloReceiver3会均衡分配
*
* @param req
* @return
*/
@GetMapping(value = "/rabbitmq")
@ApiOperation(value = "测试rabbitmq", notes = "测试rabbitmq")
public Result<?> rabbitMqClientTest(HttpServletRequest req) {

View File

@ -17,6 +17,8 @@ import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
/**
* 定义接收者可以定义N个接受者消息会均匀的发送到N个接收者中
*
* RabbitMq接受者1
* @RabbitListener声明类上一个类只能监听一个队列
*/
@ -35,7 +37,7 @@ public class HelloReceiver1 extends BaseRabbiMqHandler<BaseMap> {
public void handler(BaseMap map, Channel channel) {
//业务处理
String orderId = map.get("orderId").toString();
System.out.println("MQ Receiver1orderId : " + orderId);
log.info("【我是处理人1】 MQ Receiver1orderId : " + orderId);
// jeecgTestClient.getMessage("JEECG");
try{
// HttpHeaders requestHeaders = new HttpHeaders();

View File

@ -13,6 +13,8 @@ import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
/**
* 定义接收者可以定义N个接受者消息会均匀的发送到N个接收者中
*
* RabbitMq接受者2
* @RabbitListener声明类上一个类只能监听一个队列
*/
@ -28,7 +30,7 @@ public class HelloReceiver2 extends BaseRabbiMqHandler<BaseMap> {
public void handler(BaseMap map, Channel channel) {
//业务处理
String orderId = map.get("orderId").toString();
log.info("MQ Receiver2orderId : " + orderId);
log.info("【我是处理人2】 MQ Receiver2orderId : " + orderId);
}
});
}

View File

@ -12,7 +12,9 @@ import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
/**
* RabbitMq接受者3
* 定义接收者可以定义N个接受者消息会均匀的发送到N个接收者中
*
* RabbitMq接受者3【我是处理人3】
* @RabbitListener声明类方法上一个类可以多监听多个队列
*/
@Slf4j
@ -26,7 +28,7 @@ public class HelloReceiver3 extends BaseRabbiMqHandler<BaseMap> {
public void handler(BaseMap map, Channel channel) {
//业务处理
String orderId = map.get("orderId").toString();
log.info("MQ Receiver3orderId : " + orderId);
log.info("【我是处理人3】MQ Receiver3orderId : " + orderId);
}
});
}