自动化立体仓库 - WMS系统
luxiaotao1123
2020-07-11 8aef28e39575b910aa08c0c102c868d60fb306ea
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.zy.common.web;
 
import com.core.common.Cools;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
 
import javax.servlet.http.HttpServletResponse;
 
/**
 * Created by vincent on 2019-07-30
 */
@Controller
public class RouterController {
 
    @Value("${spring.application.name}")
    private String applicationName;
 
    @RequestMapping("/")
    public void index(HttpServletResponse response) {
        try{
            String redirect = Cools.isEmpty(applicationName)?"views/index.html":"/"+applicationName+"/views/index.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
 
    @RequestMapping("/login")
    public void login(HttpServletResponse response) {
        try{
            String redirect = Cools.isEmpty(applicationName)?"/views/login.html":"/"+applicationName+"/views/login.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
 
    @RequestMapping("/pda")
    public void pda(HttpServletResponse response) {
        try{
            String redirect = Cools.isEmpty(applicationName)?"/views/pda/login.html":"/"+applicationName+"/views/pda/login.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
 
    @RequestMapping("/pda/ce")
    public void pdaCe(HttpServletResponse response) {
        try{
            String redirect = Cools.isEmpty(applicationName)?"/views/pdaCe/login.html":"/"+applicationName+"/views/pdaCe/login.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();
        }
    }
 
}