report errors:
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [queryUserList], template might not exist or might not be accessible by any of the configured Template Resolvers
at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE]
-
- when the controller layer finished processing the request and returned, it did not use @Restcontroller or @ResponseBody but returned a non JSON format
-
- in this case, the returned data thymeleaf template cannot be parsed and an error is directly reported. I officially reported an error for this reason
Solution: you can change @Controller to @Restcontroller, but you should pay attention to whether other methods return HTML pages, which will result in string instead of page; The best way is to add a @ResponseBody to the requested method.
-
-
- when the corresponding method of your controller layer returns the HTML path and name, add an additional /
-
For example, return “/ index”. If this/causes an error, the solution is to remove the/in front of the return, such as return “/ index”.
-
-
-
- in the process of using springboot, if thymeleaf is used as the template file, the HTML format must be strict HTML5 format and there must be an end tag, otherwise an error will be reported</ ol>
-
-
The solution is as follows:
add the following configuration in application.yml
spring.thymeleaf.content-type: text/html
spring.thymeleaf.cache: false
spring.thymeleaf.mode: LEGACYHTML5
Add the following dependencies in pom.xml
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
The path of the
-
-
-
-
- resource file has been modified. If your other requests return normally, you can ignore this one
-
-
-
Solution: add in the of pom.xml file
<resource>
<directory>src/main/resources</directory>
</resource>
Read More:
- org.thymeleaf.exceptions.TemplateInputException: Error resolving template [hello scope], template mi
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template
- Springboot thymeleaf Error: Exception processing template “table/dynamic_table”: Error resolving template [common]…
- Error resolving template [index], template might not exist
- [Solved] Error resolving template template might not exist or might not be accessible
- [Solved] Error resolving template [x] template might not exist or might not be accessible by any of the con
- How to Solve Springboot use thymeleaf template error
- How to Solve JAR pack error: Error resolving template [/userInfo], template might not exist or might not be accessib
- thymeleaf Error: An error happened during template parsing Cannot render error page for request
- [Solved] org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession…
- Mybatis query error: Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException…
- MDK keil template annotation template
- Thymeleaf namespace th error [How to Solve]
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org
- [Solved] ERROR org.springframework.boot.SpringApplication – Application run failed org.yaml.snakeyaml.scanner
- [Solved] Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException
- Microservice call exceptions: error feign.RetryableException: Read timed out executing POST http://xxx…….
- [Solved] org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception
- [Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a
- [Solved] org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject…