在使用thymeleaf的时候产生了一个bug:
org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: “${}” (template: “1” - line 8, col 3)
问题描述
在进行thymeleaf的基本使用的测试时,我在html中编写注释进行加强记忆。
原因分析:
是我在注释中写了thymeleaf的取值格式 [[${}]] 但是thymeleaf的编译在服务器不认识html的注释,在编译到那个空取值时就报错了
解决方案:
把注释去掉或者不要放空就可以。