SpringBoot: Thymeleaf按钮点击事件传参的问题

转载请标明来源:https://blog.csdn.net/SingingFisher/article/details/86136250

一、问题来源

 在学习SpringBoot配置Thymeleaf的过程中,参照例子使用按钮点击事件传参,代码如下:

报错

org.thymeleaf.exceptions.TemplateProcessingException 

二、问题原因

网上给出了各种解决方案,实际上,此代码并无问题,而是springboot版本更新的原因。

我尝试在1.3.0和1.3.3版本中,用此代码均正常,在2.1.1版本中使用https://blog.csdn.net/Lactually/article/details/84306960文章中提的:

三、总结

学习的时候最好还是使用和书本中对应的版本,省的跳进不必要的坑中。

 

你可能感兴趣的:(SpringBoot)