IntelliJ中用于Spring的Thymleaf-未注册URI

jlo*_*log 6 spring intellij-idea thymeleaf

我的home.html文件显示的错误是IntelliJ中未注册URI(设置|语言和框架|模式和DTD)。

包含名称空间的html文件是

<!DOCTYPE html><html lang="en" xmlns:th="http://www.thymeleaf.org"> 
Run Code Online (Sandbox Code Playgroud)

我试图获取外部资源,但这不起作用

And*_*sen 5

运行代码时,该错误不是问题,但是IntelliJ无法为您提供th:*功能的代码补全。

JetBrains故意这样做,因为它们在此处指定:https : //www.jetbrains.com/help/idea/thymeleaf.html

为了能够在IntelliJ IDEA中使用Thymeleaf支持,请确保已启用Thymeleaf插件。(此插件与IDE捆绑在一起,并默认启用。)

在页面顶部,它说:

仅Ultimate Edition支持此功能。

我还没有找到可以为您提供Thymeleaf支持的Community Edition插件,但是Thymeleaf可以正常工作,您不会从IDE中获得任何帮助


Wil*_*ano 2

转到:文件| 设置 | 插件

单击“安装 Jetbrains 插件...”。在搜索栏中找到Thymeleaf,点击安装。

需要重新启动。