org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is java.lang.IllegalArgumentException: Model has no value for 


@RequestMapping("/test7/{id}")
    public ModelAndView test7(ModelAndView view, @PathVariable("id") int id) {
        RedirectView redirectView = new RedirectView("/index{id}");
        redirectView.setExpandUriTemplateVariables(false);
        redirectView.setExposeModelAttributes(false);
        view.setView(redirectView);
        view.addObject("test", "test");
        return view;
    }