package com.cftech.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 视图控制器,返回jsp视图给前端
 * 
 * @author StarZou
 * @since 2014年5月28日 下午4:00:49
 **/
@Controller
@RequestMapping("/page")
public class PageController {

    /**
     * 登录页
     */
    @RequestMapping(value = "/login",method = {RequestMethod.GET,RequestMethod.POST})
    public String login(Model model) {
        return "login";
    }

    /**
     * dashboard页
     */
    @RequestMapping(value = "/dashboard",method = {RequestMethod.GET,RequestMethod.POST})
    public String dashboard() {
        return "dashboard";
    }

    /**
     * 404页
     */
    @RequestMapping(value = "/404",method = {RequestMethod.GET,RequestMethod.POST})
    public String error404() {
        return "404";
    }

    /**
     * 401页
     */
    @RequestMapping(value = "/401",method = {RequestMethod.GET,RequestMethod.POST})
    public String error401() {
        return "401";
    }

    /**
     * 500页
     */
    @RequestMapping(value = "/500",method = {RequestMethod.GET,RequestMethod.POST})
    public String error500() {
        return "500";
    }

}