【发布时间】:2016-05-30 01:47:53
【问题描述】:
我想将 google map javascript 添加到 Thymeleaf 模板,如下所示:
https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places
抛出异常:
org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 93; The reference to entity "key" must end with the ';' delimiter
我尝试将& 更改为&,但没有任何改变。
您的帮助将不胜感激。谢谢!
【问题讨论】:
-
因为 Thymeleaf 模板是 XML,你应该在属性值中使用
&而不是&。 -
您必须将 & 编码为 &。因为 &是 & 的转义序列,XML 会发现它是文字。
标签: java spring-mvc web thymeleaf