org.thymeleaf.exceptions.TemplateInputException: Error resolving template [XXX]

Error record:

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [currentUserCartItems]

Background: Spring + thymeleaf reports an error

Reason: no @ respontroller or @ ResponseBody annotation is written on the method of data returned by the controller, and the returned data will be converted to JSON format

note: if it is necessary to return page Jump, it is best to add @ ResponseBody annotation on the specific method of data returned, otherwise other controllers cannot jump to the page normally

Read More: