我试图发展与春天启动的应用程序,我有以下的HTML春天的SAXParseException
<!doctype html>
<html ng-app>
<head>
<title>Hello AngularJS</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<script src="hello.js"></script>
</head>
<body>
<div ng-controller="Hello">
<p>The ID is {{greeting.id}}</p>
<p>The content is {{greeting.content}}</p>
</div>
</body>
</html>
我得到这个错误,我不知道为什么,这是相同的代码从https://spring.io/guides/gs/consuming-rest-angularjs/的例子
org.xml.sax.SAXParseException:与元素类型“html”关联的属性名称“ng-app”必须后跟'='字符。
我不认为Spring Boot在这里做了一些特别的事情。检查百里香设置:http://www.thymeleaf.org/doc/usingthymeleaf.html#what-kind-of-templates-can-thymeleaf-process。您也可能会发现这个讨论很有用:https://github.com/spring-projects/spring-boot/issues/1270 – Maks