zoukankan      html  css  js  c++  java
  • SpringMVC从一个controller跳转到另一个controller

    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";
        }
  • 相关阅读:
    经验大奉献。收集您的经验之你用什么方法提高.NET网站的性能!
    [书]:asp.net 2.0 高级编程(微软技术丛书)
    VS 2008 快捷键
    [书]:《Improving ASP.NET Performance》提高系统性能
    [书]:<<软件工程导论>> 听说很好,不知是真的否.
    [转] C#编码好习惯,献给所有热爱c#的同志
    [书]:UML和模式应用
    在后台代码里写 JS语句.
    查看和修改MTU值
    Lucene.NET搜索多个索引文件
  • 原文地址:https://www.cnblogs.com/rixiang/p/5053206.html
Copyright © 2011-2022 走看看