付延余
2022-12-16 f0f8ee8c4a945adbc742d9bab69382b28ad311fb
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
package com.wgcloud.controller;
 
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * @version v3.3
 * @ClassName:CommonController.java
 * @author: http://www.wgstart.com
 * @date: 2021年1月16日
 * @Description: 暂时没用
 * @Copyright: 2019-2021 wgcloud. All rights reserved.
 */
@Controller
@RequestMapping(value = "/common/error")
public class CommonController {
 
 
    /**
     * 转向到404页面
     *
     * @param model
     * @param request
     * @return
     */
    @RequestMapping("404")
    public String to404(Model model, HttpServletRequest request) {
        return "error/404";
    }
 
    /**
     * 转向到500页面
     *
     * @param model
     * @param request
     * @return
     */
    @RequestMapping("500")
    public String to500(Model model, HttpServletRequest request) {
        return "error/500";
    }
 
    /**
     * 转向到guest页面,提示没有授权的操作
     *
     * @param model
     * @param request
     * @return
     */
    @RequestMapping("guestError")
    public String toGuestError(Model model, HttpServletRequest request) {
        return "error/guestError";
    }
 
}