summaryrefslogtreecommitdiff
path: root/src/main/java/com/mesasoft/cn/web/controller/ViewController.java
blob: 33ad670a14d64e7b57eee84f8a091722b1811a67 (plain)
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
60
61
62
63
package com.mesasoft.cn.web.controller;

import com.mesasoft.cn.annotation.AuthInterceptor;
import com.mesasoft.cn.enums.InterceptorLevel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author pantao
 * @since 2018/1/25
 */
@Controller
@Api(description = "视图页面映射")
public class ViewController {

    @ApiOperation(value = "远程文件管理页面")
    @AuthInterceptor(InterceptorLevel.SYSTEM)
    @RequestMapping(value = "/filemanager", method = RequestMethod.GET)
    public String fileManager() {
        return "/filemanager";
    }

    @ApiOperation(value = "上传页面")
    @AuthInterceptor
    @RequestMapping(value = "/upload", method = RequestMethod.GET)
    public String upload() {
        return "/upload";
    }

    @ApiOperation(value = "首页")
    @AuthInterceptor(InterceptorLevel.NONE)
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String index() {
        return "/index";
    }

    @ApiOperation(value = "登录、注册、忘记密码页面")
    @AuthInterceptor(InterceptorLevel.NONE)
    @RequestMapping(value = "/signin", method = RequestMethod.GET)
    public String signin() {
        return "/signin";
    }

    @ApiOperation(value = "管理员页面")
    @AuthInterceptor(InterceptorLevel.ADMIN)
    @RequestMapping(value = "/admin", method = RequestMethod.GET)
    public String admin() {
        return "/admin";
    }

    @ApiIgnore
    @AuthInterceptor(InterceptorLevel.NONE)
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    @ResponseBody
    public String test() {
        return "<b>test</b>";
    }
}