thymeleaf访问页面解析出错Could not parse as expression:

最近使用thymeleaf模板,出现解析错误:Could not parse as expression:。

原因

因为我在页面js中定义了一个数组:var arr = [[],[]],thymeleaf可能会认为是自己的标签。

解决方案

在<script type="text/javascript" >  加上 th:inline="none"

<script type="text/javascript"  th:inline="none">
发布了19 篇原创文章 · 获赞 15 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/minion_banana/article/details/82772034