我是我的Springsource工具套件,我想開發一個基於maven的web項目。父原型創建者使用了thymeleaf標籤(th:block)。它正在工作,但我在STS中得到警告:Unkown標記(th:block)。我如何解決這個警告?Springsource工具套件thymeleaf標籤未知
1
A
回答
4
因爲我不能添加評論,我會在這裏寫:
檢查三件事情:
行家是否含有thymeleaf依賴呢? 類似this。
你有Thymeleaf解析器正確設置: 這是註釋例如:
@Bean 公共ThymeleafViewResolver視圖解析器(){ ThymeleafViewResolver thymeleafViewResolver =新ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine()); thymeleafViewResolver.setCharacterEncoding(「UTF-8」); return thymeleafViewResolver; }
請問您的看法有適當的HTML標記:
HTML的xmlns = 「http://www.w3.org/1999/xhtml」 的xmlns :TH =「HTTP://www.thymeleaf .org「
0
對於HTML,DTD不會被解析。
嘗試使用Eclipse插件(記得要加Thymeleaf性質項目):https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin
相關問題
- 1. SpringSource工具套件問題
- 2. Springsource工具套件跳過代碼
- 3. 卸載的SpringSource工具套件
- 4. SpringSource工具套件更改主題
- 5. 配置SpringSource工具套件與AspectJ
- 6. 重構的SpringSource工具套件生產非工作代碼
- 7. jquery和jquery-ui在Springsource工具套件中不工作2.3.3.M1
- 8. SpringSource工具套件無法找到Spring模式文件
- 9. 如何在SpringSource工具套件項目中啓用Datanucleus支持
- 10. JDBC與SpringSource工具套件不起作用
- 11. ROO使用SpringSource工具套件進行註釋
- 12. 分享eclipse/springsource工具套件服務器啓動配置
- 13. SpringSource工具套件中的Maven依賴關係
- 14. SpringSource工具套件和GWT不使用ROO?
- 15. 無法使用SpringSource工具套件計算構建計劃
- 16. SpringSource工具套件無法進口彈簧庫類
- 17. SpringSource工具套件 - 無法運行Spring模板項目
- 18. SpringSource工具套件缺少Spring MVC的項目模板
- 19. SpringSource工具套件無法找到我想要配置SpringSource工具套件2.7.1.RELEASE</p> <p>如果我試圖安裝一個插件網站
- 20. 配置Springsource工具套件(STS,eclipse)與grails協同工作的最佳方式
- 21. 未知spring標籤
- 22. 未知標籤JSF
- 23. 未知標籤c:forEach
- 24. Springsource工具套件或roo無法創建目錄或文件問題
- 25. 如何更改Eclipse/SpringSource工具套件中源文件夾的順序
- 26. 跟蹤未關閉標籤的工具
- 27. 使用Spring工具套件的Thymeleaf模板中沒有結束標籤版本:3.8.4.RELEASE
- 28. 在BLC標籤Thymeleaf個標籤
- 29. 如何在spring web服務開發中使用springsource工具套件?
- 30. 通過更新站點安裝的SpringSource工具套件(STS)不起作用
我有這樣的片段在我WebMvcConfig @Bean 公共ThymeleafViewResolver視圖解析器(){ ThymeleafViewResolver thymeleafViewResolver =新ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine()); thymeleafViewResolver.setCharacterEncoding(「UTF-8」); return thymeleafViewResolver; } –
請檢查編號3.如果我把它從我的HTML頁面中取出,我會得到相同的警告。在html標籤中插入:,實際上只有最後一部分它的...(xmlns:th =「http://www.thymeleaf.org」) – Blejzer
當我用標籤替換這個標籤時,我沒有任何警告: (我刪除了這個」;「,因爲它引發了另一個警告)謝謝Blejzer! –