如何在Spring中调用另一个控制器的处理程序

时间:2018-06-18 06:29:19

标签: spring-mvc

这是我的LoanSchemeController

@RequestMapping(value={VspCommonConstants.STUDENT_ROLE_URL+"/scholarship_login"}, method = RequestMethod.GET)
    public ModelAndView scholarship_login(Model modelMap,HttpServletRequest request)
    {   
        return ModelAndView;
    }

这是我的ProfileController

@RequestMapping(value=VspCommonConstants.STUDENT_ROLE_URL+"/submitProfileAttachedFiles", method=RequestMethod.POST)
    public ModelAndView submitProfileAttachedFiles(@ModelAttribute("profileSupportingDocDtls") ProfileSupportingDocDtls profileSupportingDocDtls,
            BindingResult result, ModelMap model,Authentication auth, HttpServletRequest request) 
    {

            return new ModelAndView("studentDashboard");

        }

现在请告诉我如何从Profilecontroller调用LoanSchemecontroller的handler(/ scholarship_login)。即不是重定向到" studentDashboard" jsp页面,我想调用处理程序" / scholarship_login"它存在于另一个控制器中。提前谢谢。

0 个答案:

没有答案