Package com.skymobi.qc.admin.controller

Source Code of com.skymobi.qc.admin.controller.MainController

package com.skymobi.qc.admin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

import com.skymobi.qc.admin.framework.base.BaseController;


@Controller
@RequestMapping({"/"})
public class MainController  extends BaseController {
 
  /**
   * 首页面,根据登录情况进行跳转.
   * if unlogin:
   *     /login
   * else:
   *     /frame
   * @return String
   */
  @RequestMapping
  public String main() {
    return "/main/login";
  }
 
  @RequestMapping("/main")
  public ModelAndView mainPage(Model model) {
    return new ModelAndView(new RedirectView("/cpqa/project"));
  }
 
//  public String add(@Valid AppointmentForm appointment, BindingResult result) {
//        if (result.hasErrors()) {
//            return "appointments/new";
//        }
//        appointmentBook.addAppointment(appointment);
//        return "redirect:/appointments";
//    }
}
TOP

Related Classes of com.skymobi.qc.admin.controller.MainController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.