New file |
| | |
| | | package com.mes.controller;
|
| | |
|
| | | import com.mes.entity.DownGlassInfo;
|
| | | import com.mes.service.DownGlassInfoService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
|
| | | @RestController
|
| | | @RequestMapping("/downGlassInfo")
|
| | | public class DownGlassInfoController {
|
| | |
|
| | | @Autowired
|
| | | private DownGlassInfoService downGlassInfoService;
|
| | |
|
| | | // 获取指定ID的DownGlassInfo信息
|
| | | @GetMapping("/{id}")
|
| | | public DownGlassInfo getDownGlassInfoById(@PathVariable Integer id) {
|
| | | return downGlassInfoService.getDownGlassInfoById(id);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | // @GetMapping("/messages")
|
| | | // public String getMessages() throws IOException, TimeoutException {
|
| | | // List<String> messages = new ArrayList<>();
|
| | | // try {
|
| | | // messages = RabbitMQUtils.browseMessages("hangzhou2");
|
| | | // } catch (Exception e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // return messages.toString(); // 返回消息列表的字符串表示形式
|
| | | // }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|