SpringBoot返回结果报错org.thymeleaf.exceptions.TemplateInputException: Error resolving template "xxx/xxx", template might not exist or might not be accessible by any of the configured Template Resolvers

原因:

在controller层请求处理完了返回时,没有使用@RestController或@ResponseBody而返回了非json格式

解决:

1,类上注解@Controller改为@RestController  注意:如果同一个controller中有其他方法需要返回html页面路径,这个时候需要换成方法2,否则返回的是页面地址,而不是页面
2,在报错的方法上添加@ResponseBody注解

原文地址:https://www.cnblogs.com/gczmn/p/12416534.html