我試圖發展與春天啓動的應用程序,我有以下的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