Ver código fonte

包装机自动监听数据自动插入

赵冬冬 3 anos atrás
pai
commit
791bae1ae8

+ 31 - 0
src/main/java/com/hw/admin/model/controller/JumpController.java

@@ -0,0 +1,31 @@
+package com.hw.admin.model.controller;
+
+
+import com.hw.admin.model.domain.AjaxResultVo;
+import com.hw.admin.model.domain.WorkPacker;
+import com.hw.admin.model.service.WorkPackerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/jump")
+public class JumpController {
+
+    @Autowired
+    private WorkPackerService workPackerService;
+
+    @GetMapping("/{parm}")
+    @ResponseBody
+    public void add(@PathVariable("parm") String parm, HttpServletResponse response) throws IOException {
+
+        String url = "http://127.0.0.1:8848/111/" + parm + ".html";
+        response.sendRedirect(url);
+    }
+
+
+}