idea中使用Thymeleaf语法编写代码不提示解决方法

1、查看file—setting–pligins中thymeleaf是否开启


2、需要在pom工程中引入thymeleaf启动器坐标

 <!--thymeleaf启动器坐标-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

3、在HTML文件里加上命名空间

<html lang="en" xmlns:th="http://www.thymeleaf">

然后再编写代码就会有提示信息。

更多推荐

idea中使用Thymeleaf语法编写代码不提示解决方法