Simple statement: The console has this exception: Error resolving template "xxx", template might not exist or might not being accessible by any of the Configur Ed Template resolvers
Workaround: Add annotations on the method that reported the exception @responsebody
To tell you the personal understanding: This annotation is used to distinguish between the method's return value string and the View resolver parsing the page name of the string conflict, for example: Method A returns the string success, if the Ajax callback function with the MSG match, will pop up a "successful execution", Because success is just a normal string, add @responsebody to the top of the method. The return value of method B is "/contextlist", and this is a page contextlist.jsp or contextlist.html (specifically what to look at the configuration, anyway, is a page).
Online Find information (blog link: 80989584):
The Controller layer plus annotations @controller and @restcontroller both can be on the front-end of the interface, but the difference is that when using the former must be added to the method of annotation @responsebody, If you do not add @responsebody, the above error is reported because the spring default method returns a View object (page) when using @controller annotations. With @responsebody, the method returns the specific object. The function of the @RestController is equivalent to the @[email protected] binding body
Exception: Error resolving template "xxx", template might not exist or might not being accessible ... Workaround