init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.cai.controller.admin;
|
||||
|
||||
import com.ruoyi.cai.mq.AmqpProducer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cai/mq/test")
|
||||
public class MqControllerTest {
|
||||
|
||||
@Autowired
|
||||
private AmqpProducer amqpProducer;
|
||||
|
||||
@GetMapping("/send")
|
||||
public void send(String message,Integer time){
|
||||
amqpProducer.sendCheckTimeOut(message,time);
|
||||
}
|
||||
|
||||
@GetMapping("/send2")
|
||||
public void send(String message){
|
||||
amqpProducer.sendCalculateSales(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user