I know in spring mvc in @Controller class in @RequestMapping method I can return
I don\'t understa
Unless your return type is void or you annotate your method with @ResponseBody, Spring MVC will try to resolve a View to render the response.
Therefore, you must somehow point the framework to a View instance or to the name of a view as String in your returned value (or rely on the implicit resolving and perhaps only return the Model); if you return a name (either as a mere String or embedded in a ModelAndView), that will then be passed to a configured ViewResolver to obtain an actual View instance.
The ModelAndView container does hold a reference to a View or view name and also embeds the model to use.