@RestController is a stereotype annotation that combines @responsebody and @Controller. The @restController annotation is equivalent to @responseBody + @Controller put together.
1) if only using the @ RestController annotations Controller, the method of the Controller can’t return to the JSP page, configure the view of the parser InternalResourceViewResolver doesn’t work, The content returned is the content of the Return.
For example, the success.jsp page displays SUCCESS when it should go to it.
2) if you need to return to the specified page, you will need to use @ InternalResourceViewResolver view Controller with the parser. 3) If you want to return JSON, XML, or custom mediaType content to the page, you need to annotate the corresponding method with @responseBody. Original text: blog.csdn.net/gg12365gg/a…