forked from chengxy-nds/Springboot-Notebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRabbitController.java
More file actions
28 lines (21 loc) · 883 Bytes
/
RabbitController.java
File metadata and controls
28 lines (21 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.chengxy.delayqueue.controller;//package com.xinzf.project.controller;
import com.chengxy.delayqueue.deadLetterQueue.DeadLetterSendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.Map;
@Controller
@RequestMapping
public class RabbitController {
@Autowired
private DeadLetterSendMessage deadLetterSendMessage;
@RequestMapping(value = "/rabbit", method = RequestMethod.GET)
@ResponseBody
public Map<String, Object> dirtRabbit(String delayTimes) throws IOException {
deadLetterSendMessage.send(delayTimes);
return null;
}
}