Tag Archives: θυμελεαφ

Solve the problem of There was an unexpected error (type=Internal Server Error, status=500) (using Thymeleaf to report an error)

Error details
Today, when I was watching a video and writing a small demo, I used the Thymeleaf framework to build the front end and started the SpringBoot project. I reported the error as shown in the figure below
Find the problem
Checked the database query and other code after a series of tests, found that there are no mistakes, then find a large number of blogs, online to tell you the truth, really didn’t find out how many useful things, perhaps because the problem is not the same, however, also good finally found two useful blog on their own, although the problem is a bit different, but it solved my problem.
the first blog is mainly about the problem of dependence
springboot+thymeleaf view mapping error: There was an unexpected error (type=Not Found, status=404)
the second blog mainly used the thymeleaf pit
to solve the thymeleaf There was an unexpected error (type=Internal Server error, status=500).
To solve
1. First of all, I checked my thymeleaf grammar problems, and after all of them were found, I started the project after deploying the project again or reported an error
2. Then I referred to the first blog and added the related dependence of thymeleaf (as shown below), there was no problem in starting the project again.

<dependency>
       <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
if blogs have write wrong place, welcome to pointed out.
finally, I just want to make a silent joke, why the video did not add this dependency run project is no problem, then I have a problem???If there is any elder brother know, trouble points a ha.