【发布时间】:2019-09-16 16:25:38
【问题描述】:
thymeleaf 内容辅助不起作用,当我在 HTML 文件中键入 th: 前缀时,只显示 th:block 提议。
<th:block
我已尝试将 Thymeleaf 处理器提案移至 HTML 文件的 STS/elipse 设置的顶部,但不起作用。
项目是Spring Boot + Thymeleaf,Gradle sn-p:
plugins {
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
implementation "org.springframework.boot:spring-boot-devtools"
}
我已经添加了 html 命名空间:
<html xmlns:th="http://www.thymeleaf.org">
将第 th 个命名空间更改为另一个不起作用;
嗯,唯一的工作时间是 th 只是替换 HTML th 位置...
<table>
<tbody>
<tr th:
【问题讨论】:
-
你找到解决这个问题的方法了吗?
标签: java spring spring-boot thymeleaf