springboot1升级springboot2遇到的坑 框架 springboot2+shiro1.4.2+thymeleaf-extras-shiro2.0

Could not parse as expression: "XXXX+_+${info.key}"

废话少说直接上代码

shiro1.0时候的前端代码:

<div  th:each="info:${lists}">

<input th:name="info+_+${info.key}" />

</div>

运行会报:

 Could not parse as expression: "paymentMethod+_+${paymentMethod.key}"

网上找了很多资料 有说用[[]] 这都没有用。因为我这边用到的自定义的前缀。所以运行就编译不通过。后台找到了官方资料

https://www.thymeleaf.org/doc/articles/standardurlsyntax.html  有耐心的朋友可以多看看,我就把这个总结出来

修改以下内容就行

<input th:name="${'paymentMethod_'+paymentMethod.key}" />

希望升级springboot2的朋友可以跳过这个坑。 

发布了35 篇原创文章 · 获赞 1 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/u010494101/article/details/103490696
今日推荐