template might not exist or might not be accessible by any of the configured Template Resolvers
来源:互联网 发布:南通大学网络教学平台 编辑:程序博客网 时间:2024/06/07 08:19
application.properties配置文件
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.htmlspring.thymeleaf.mode=LEGACYHTML5
#spring.thymeleaf.encoding=UTF-8
#spring.thymeleaf.content-type=text/html # ;charset=<encoding> is added
spring.thymeleaf.cache=false
springboot使用thymeleaf时报html没有结束标签
在使用springboot的过程中,如果使用thymeleaf作为模板文件,则要求HTML格式必须为严格的html5格式,必须有结束标签,否则会报错!解决办法如下:
1、你可以使用严格的标签,也就是每个标签都有结束标签,这种可能比较麻烦
2、在application.properties中增加spring.thymeleaf.mode=LEGACYHTML5,即声明thymeleaf使用非严 格的html。
maven依赖如下
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
现在就可以正常访问了。
阅读全文
5 0
- template might not exist or might not be accessible by any of the configured Template Resolvers
- template might not exist or might not be accessible by any of the configured Template Resolvers
- TemplateInputException:template might not exist or might not be accessible
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error: Socket descriptor not found. Hint: the problem might be solved applyi...
- The Handler class should be static or leaks might occur.
- the class should be static or leaks might occus
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- Fix "\\computer is not accessible. You might not have permission to use this network resource”
- You might not need jQuery
- spark-shell on yarn 出错(arn application already ended,might be killed or not able to launch applic)解决
- Python 二三事
- 保留两位小数(四舍五入/不四舍五入)
- cublas vs nervana
- LeetCode: 3 Sum
- js-闭包
- template might not exist or might not be accessible by any of the configured Template Resolvers
- 【WEB开发技术】一个简单的WEB项目验证码校验(如何从前端到后台一步一步的搭建、配置、发布整个Web项目?)
- Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found在Studio里导入moudle时报错解决方案
- c语言经典面试题
- android 7.0 兼容多语言切换总结
- Linux内核中__setup的用途
- strlen()和sizeof()区别
- oracle创建用户、授权、建表空间
- FZU 2207 以撒的结合(LCA+记录路径)