码迷,mamicode.com
首页 > 编程语言 > 详细

SpringMVC从一个controller跳转到另一个controller

时间:2015-12-17 10:46:30      阅读:313      评论:0      收藏:0      [点我收藏+]

标签:

return "redirect:……路径……";

    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String index(ModelMap model) {
        Admin admin = adminService.getCurrent();
        if(admin.getSeller()!=null)
        {
            return "redirect:/admin/seller/order/list";
        }
        model.addAttribute("systemName", systemName);
        model.addAttribute("systemVersion", systemVersion);
        model.addAttribute("systemDescription", systemDescription);
        model.addAttribute("systemShowPowered", systemShowPowered);
        model.addAttribute("javaVersion", System.getProperty("java.version"));
        model.addAttribute("javaHome", System.getProperty("java.home"));
        model.addAttribute("osName", System.getProperty("os.name"));
        model.addAttribute("osArch", System.getProperty("os.arch"));
        model.addAttribute("serverInfo", servletContext.getServerInfo());
        model.addAttribute("servletVersion", servletContext.getMajorVersion() + "." + servletContext.getMinorVersion());
        model.addAttribute("waitingPaymentOrderCount", orderService.waitingPaymentCount(null));
        model.addAttribute("waitingShippingOrderCount", orderService.waitingShippingCount(null));
        model.addAttribute("marketableProductCount", productService.count(null, true, null, null, false, null, null));
        model.addAttribute("notMarketableProductCount", productService.count(null, false, null, null, false, null, null));
        model.addAttribute("stockAlertProductCount", productService.count(null, null, null, null, false, null, true));
        model.addAttribute("outOfStockProductCount", productService.count(null, null, null, null, false, true, null));
        model.addAttribute("memberCount", memberService.count());
        model.addAttribute("unreadMessageCount", messageService.count(null, false));
        return "/admin/common/index";
    }

 

SpringMVC从一个controller跳转到另一个controller

标签:

原文地址:http://www.cnblogs.com/rixiang/p/5053206.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!