@Test public void testDashboardNoModule() { ModelAndView result = controller.index(request); Assert.assertEquals("index", result.getViewName()); Assert.assertNull(result.getModelMap().get(CURRENT_MODULE)); }
@RequestMapping({ "/index", "/", "/home" }) public ModelAndView index(final HttpServletRequest request) { ModelAndView mav; if (startupManager.isConfigRequired()) { mav = new ModelAndView(Constants.REDIRECT_STARTUP); } else { mav = new ModelAndView("index"); mav.addObject("isAccessDenied", false); mav.addObject("loginPage", false); String contextPath = request.getSession().getServletContext().getContextPath(); if (StringUtils.isNotBlank(contextPath) && !"/".equals(contextPath)) { mav.addObject("contextPath", contextPath.substring(1) + "/"); } else if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { mav.addObject("contextPath", ""); } } return mav; }
DashboardController { @RequestMapping({ "/index", "/", "/home" }) public ModelAndView index(final HttpServletRequest request) { ModelAndView mav; if (startupManager.isConfigRequired()) { mav = new ModelAndView(Constants.REDIRECT_STARTUP); } else { mav = new ModelAndView("index"); mav.addObject("isAccessDenied", false); mav.addObject("loginPage", false); String contextPath = request.getSession().getServletContext().getContextPath(); if (StringUtils.isNotBlank(contextPath) && !"/".equals(contextPath)) { mav.addObject("contextPath", contextPath.substring(1) + "/"); } else if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { mav.addObject("contextPath", ""); } } return mav; } }
DashboardController { @RequestMapping({ "/index", "/", "/home" }) public ModelAndView index(final HttpServletRequest request) { ModelAndView mav; if (startupManager.isConfigRequired()) { mav = new ModelAndView(Constants.REDIRECT_STARTUP); } else { mav = new ModelAndView("index"); mav.addObject("isAccessDenied", false); mav.addObject("loginPage", false); String contextPath = request.getSession().getServletContext().getContextPath(); if (StringUtils.isNotBlank(contextPath) && !"/".equals(contextPath)) { mav.addObject("contextPath", contextPath.substring(1) + "/"); } else if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { mav.addObject("contextPath", ""); } } return mav; }  }
DashboardController { @RequestMapping({ "/index", "/", "/home" }) public ModelAndView index(final HttpServletRequest request) { ModelAndView mav; if (startupManager.isConfigRequired()) { mav = new ModelAndView(Constants.REDIRECT_STARTUP); } else { mav = new ModelAndView("index"); mav.addObject("isAccessDenied", false); mav.addObject("loginPage", false); String contextPath = request.getSession().getServletContext().getContextPath(); if (StringUtils.isNotBlank(contextPath) && !"/".equals(contextPath)) { mav.addObject("contextPath", contextPath.substring(1) + "/"); } else if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { mav.addObject("contextPath", ""); } } return mav; }  @RequestMapping({ "/index", "/", "/home" }) ModelAndView index(final HttpServletRequest request); @RequestMapping(value = "/accessdenied", method = RequestMethod.GET) ModelAndView accessdenied(final HttpServletRequest request); @RequestMapping(value = "/getUser", method = RequestMethod.GET) @ResponseBody UserInfo getUser(HttpServletRequest request); @RequestMapping(value = "/getStatus", method = RequestMethod.GET) @ResponseBody List<StatusData> getStatus(); boolean isInboundChannelActive(); @Autowired void setStartupManager(StartupManager startupManager); @Autowired void setLocaleService(LocaleService localeService); @Autowired void setEventConsumerInfo(EventConsumerInfo eventConsumerInfo); }
DashboardController { @RequestMapping({ "/index", "/", "/home" }) public ModelAndView index(final HttpServletRequest request) { ModelAndView mav; if (startupManager.isConfigRequired()) { mav = new ModelAndView(Constants.REDIRECT_STARTUP); } else { mav = new ModelAndView("index"); mav.addObject("isAccessDenied", false); mav.addObject("loginPage", false); String contextPath = request.getSession().getServletContext().getContextPath(); if (StringUtils.isNotBlank(contextPath) && !"/".equals(contextPath)) { mav.addObject("contextPath", contextPath.substring(1) + "/"); } else if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { mav.addObject("contextPath", ""); } } return mav; }  @RequestMapping({ "/index", "/", "/home" }) ModelAndView index(final HttpServletRequest request); @RequestMapping(value = "/accessdenied", method = RequestMethod.GET) ModelAndView accessdenied(final HttpServletRequest request); @RequestMapping(value = "/getUser", method = RequestMethod.GET) @ResponseBody UserInfo getUser(HttpServletRequest request); @RequestMapping(value = "/getStatus", method = RequestMethod.GET) @ResponseBody List<StatusData> getStatus(); boolean isInboundChannelActive(); @Autowired void setStartupManager(StartupManager startupManager); @Autowired void setLocaleService(LocaleService localeService); @Autowired void setEventConsumerInfo(EventConsumerInfo eventConsumerInfo);  }