Error resolving template [xxx], template might not exist or might not be accessible by any of the co

2024-06-16 16:58

本文主要是介绍Error resolving template [xxx], template might not exist or might not be accessible by any of the co,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Error resolving template [xxx], template might not exist or might not be accessible by any of the configured Template Resolvers

springboot运行成功之后,访问页面报错,反复查看代码,都没有错误,最后原因是因为给thymeleaf的默认设置进行了自定义设置,但是自定义的时候设置的值又是本来的默认值,导致程序报错:

2020-12-13 16:56:04.753 ERROR 37468 --- [nio-8888-exec-1] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8888-exec-1] Exception processing template "index": Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

其实默认设置有默认值的,自身项目没有改动的,根本不需要修改或者自定义这些设置。spring.thymeleaf下的 prefix、suffix、check-template-location、mode都是有默认值的,如果你的application.properties或者application.yml中设置了这些属性,但是值是默认值的话,删掉这些设置,就不会报错了。

application.properties

# 如果项目没有更改以下属性值,则properties中不需要设置
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.check-template-location=true
spring.thymeleaf.suffix=html
spring.thymeleaf.mode=HTML

这篇关于Error resolving template [xxx], template might not exist or might not be accessible by any of the co的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1067017

相关文章

#error用法

/* *检查编译此源文件的编译器是不是C++编译器 *如果使用的是C语言编译器则执行#error命令 *如果使用的是 C++ 编译器则跳过#error命令 */ #ifndef __cplusplus #error 亲,您当前使用的不是C++编译器噢! #endif #include <stdio.h> int main() {

brew install opencv@2 时报错 Error: Can't create update lock in /usr/local/var/homebrew/locks!

解决方案,报错里已经说明了: 我的解决方案: sudo chown -R "$USER":admin /usr/local   stackoverflow上的答案 I was able to solve the problem by using chown on the folder: sudo chown -R "$USER":admin /usr/local Also you'

BD错误集锦8——在集成Spring MVC + MyBtis编写mapper文件时需要注意格式 You have an error in your SQL syntax

报错的文件 <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.yuan.dao.YuanUserDao"><!

BD错误集锦3——ERROR: Can't get master address from ZooKeeper; znode data == null

hbase集群没启动,傻子!   启动集群 [s233 s234 s235]启动zk集群 $>zkServer.sh start $>zkServer.sh status   [s233] 启动dfs系统 $>start-dfs.sh 如果s237 namenode启动失败,则 [s237] $>hadoop-daemon.sh start namenode [s233]启动yarn集群

BD错误集锦1——[Hive]ERROR StatusLogger No log4j2 configuration file found. Using default configuration:

错误描述:在使用IDEA进行jdbc方式连接到hive数据仓库时,出现以下错误:                ERROR StatusLogger No log4j2 configuration file found. 问题原因:缺少log4j2.xml文件   <?xml version="1.0" encoding="UTF-8"?><Configuration><Appender

iOS:编译时出现no such file or directory:xxx以及use twice...filenames are used to distinguish private dec

简    注册  登录   添加关注 作者  婉卿容若 2016.04.29 11:22 写了21870字,被16人关注,获得了14个喜欢 iOS:编译时出现"no such file or directory:xxx"以及"use twice...filenames are used to distinguish private

【鸿蒙】ERROR_GET_BUNDLE_INSTALLER_FAILED

错误信息 [ERROR_GET_BUNDLE_INSTALLER_FAILED] Troubleshooting guide $ hdc file send D:\Huawei\devEcoProjects\entry\build\default\outputs\default\entry-default-unsigned.hap /sdcard/e8a215ea7be1444197e6a58e

QT 5.8.0 msvc_2015 64bit版本编译错误:-1: error: LNK1158: 无法运行“rc.exe”

一开始安装的时候我出现了另一种错误,换着D盘E盘装了几遍之后,出现了:-1: error: LNK1158: 无法运行“rc.exe”这个错误。 首先,我的系统是Windows10 1903版 64bit QT版本是 5.8.0  msvc_2015 64版 解决方法是将 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe, C:

Required xxx parameter xxxx is not present

查看后台接口参数和前端参数是否一致

关于 pnpm monorepo 项目中 TS2742 Error 的 workaround

最近我在使用 pnpm 作为包管理器开发一个 monorepo 项目,从个人体验来说,在 monorepo 项目中,pnpm 确实要比 yarn classic 用得舒心,最让我欣喜的是 pnpm 对 workspace 协议的支持度很好;另外感受比较明显的一点就是,开发过程中感知到的由于依赖层级导致的 bug 也变少了。 但是任何事情都不可能是完美的。果不其然,一个关键的 bug 就在等着我。