title: Spring Boot Redirect to /
body: <p>I would like to redirect the user to "/" page.</p>
  
  <p>In my controller, I have:</p>
  
  <pre><code>    @RequestMapping(value = "/uploadImage", method = {RequestMethod.POST})
      public ModelAndView addUser (@RequestParam(value="file") MultipartFile file,
              HttpServletRequest request,
              ModelMap model) {
      ...
      if (...) { 
              model.addAttribute("uploadFileError", true);
              return new ModelAndView("/", model);
      } 
      return new ModelAndView("/", model);
  </code></pre>
  
  <p>and in my receiving page:</p>
  
  <pre><code>    @RequestMapping(value = "/")
      public String root(Model model, HttpServletRequest request) {
      ...
      return "index";
      }
  </code></pre>
  
  <p>but Spring returns "Error resolving template [/], template might not exist or might not be accessible by any of the configured Template Resolvers"</p>
  
  <p>Please help. Thanks.</p>