12345678910111213141516171819202122232425 |
- package com.fdkankan.modeling.test;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import javax.annotation.Resource;
- @RestController
- @RequestMapping("/send")
- public class TestSendController {
- @Resource
- com.fdkankan.mq.util.RocketMQProducer rocketMQProducer;
- private final String topic ="test_model_order";
- @RequestMapping("/test")
- private void sentTest(){
- rocketMQProducer.sendInOrder(topic,"1");
- }
- @RequestMapping("/test1")
- private void sentTest1(){
- rocketMQProducer.sendOneWay(topic,"1");
- }
- }
|