【报错】An error happened during template parsing (template: "class path resource [templates/hello1.html]")

Page displays:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Fri Dec 06 23:26:03 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
An error happened during template parsing (template: "class path resource [templates/hello1.html]")
 
 

 

 

 

 

the reason:
Thymeleaf style does not meet specifications.
 
Error writing:
< P align = left = "Center" TH: text = "Now is the time de {now} $" > hihihi </ P >

Correct wording:

< P align = left = "Center" TH: text = "| time is now de {now} $ |" > hihihi </ P >
 

Vertical line can not miss! It refers to the replacement text.

Further, the connection string is also possible to use +.

Another correct wording:

< P align = left = "Center" TH: text = " 'now is the time de' + $ {now}" > hihihi </ P >

 

Guess you like

Origin www.cnblogs.com/christy99cc/p/12000196.html