SpringBoot+Thymeleaf报错:org.thymeleaf.exceptions.TemplateInputException: Error resolving template [favicon.ico], template might not exist or might not be accessible by any of the configured Template Resolvers
解决方法:
在html中加入
<link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>
如过还报错,可以直接在控制层设置忽略favicon.ico的获取
@Controller
public class PageController {
@GetMapping("favicon.ico")
@ResponseBody
void noFavicon() {
}
}