提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng) |
|
3 |
* <p> |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* <p> |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* <p> |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package cn.stylefeng.guns.sys.core.exception.page; |
|
17 |
|
|
18 |
import org.springframework.stereotype.Controller; |
|
19 |
import org.springframework.ui.Model; |
|
20 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
21 |
|
|
22 |
/** |
|
23 |
* 全局的控制器 |
|
24 |
* |
|
25 |
* @author fengshuonan |
|
26 |
* @date 2016年11月13日 下午11:04:45 |
|
27 |
*/ |
|
28 |
@Controller |
|
29 |
@RequestMapping("/global") |
|
30 |
public class GlobalController { |
|
31 |
|
|
32 |
/** |
|
33 |
* 跳转到404页面 |
|
34 |
* |
|
35 |
* @author fengshuonan |
|
36 |
*/ |
|
37 |
@RequestMapping(path = "/error") |
|
38 |
public String errorPage() { |
|
39 |
return "/404.html"; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* 跳转到session超时页面 |
|
44 |
* |
|
45 |
* @author fengshuonan |
|
46 |
*/ |
|
47 |
@RequestMapping(path = "/sessionError") |
|
48 |
public String errorPageInfo(Model model) { |
|
49 |
model.addAttribute("tips", "登陆超时,请您重新登陆!"); |
|
50 |
return "/login.html"; |
|
51 |
} |
|
52 |
} |