报错信息: 模板可能不存在或可能无法访问的任何配置的模板解析器
org.thymeleaf.exceptions.TemplateInputException:
Error resolving template [queryMonitorDataController/queryMonitorData],
template might not exist or might not be accessible by any of the configured Template Resolvers
报错原因:报错信息说的很明白,就是使用时模板出现问题。那么问题来了,什么是模板呢,比如我们在使用@Controller注解的时候通常会搭配使用@RequestMapping("queryMonitorDataController"),某种可能的搭配的形式构成了我们现在所谓的模板。比如我现在只是在controller层使用了@RequestMapping("/queryMonitorData")而未使用搭配的@ResponseBody注解就报了这么一个错误(我闲的试了一下)。有的人出现这个错可能会考虑到是不是未加“/”或者写错了什么的,请大家放心这个“/”加不加都一样(只少springboot搭建的项目没问题)。
解决方法:检查一下自己使用的注解,有没有应该搭配使用的注解而未添加,或者搭配的情况不对。