##
luxiaotao1123
2020-12-30 986aca08c6202596ec8bfbbc220b9957904eec3f
src/main/java/com/zy/common/web/RouterController.java
@@ -2,6 +2,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletResponse;
@@ -33,4 +34,24 @@
        }
    }
    @RequestMapping("/control")
    public void control(HttpServletResponse response) {
        try{
            response.sendRedirect(contextPath+"/views/control.html");
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
    @RequestMapping("/monitor/{cnrId}")
    public void monitor(@PathVariable("cnrId") Integer cnrId,
                        HttpServletResponse response) {
        try{
            String append = cnrId==null?"":("?crnId="+cnrId);
            response.sendRedirect(contextPath+"/views/monitor/monitor.html"+append);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
}