春季启动Google Maps SAXParseException

用户4554100

我正在使用Spring Boot,并尝试在我的视图中添加Google Maps。这是我尝试做的事情:

控制器

@RequestMapping(value = "/map", method = RequestMethod.GET, produces = "text/html")
    public String map(Model model) { return "map"; }

查看(resources / templates / map.html)

<script async="async" defer="defer"
        src="https://maps.googleapis.com/maps/api/js?key=/*mykey*/&callback=initMap;">
</script>

错误

org.xml.sax.SAXParseException: Referenz zu Entity "callback" muss mit dem Begrenzungszeichen ";" enden.

您如何看到我添加了“;” 在回调方法的后面,但仍然无法正常工作(当您不使用spring boot时,它也可以不使用“;”来工作)。

我怎样才能解决这个问题?

维玛贝拉

更改&&amp;您的网址。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章