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的朋友可以跳过这个坑。