【发布时间】:2018-12-28 04:29:37
【问题描述】:
我在 Windows 7 上使用 Intellij 开发了一个网站,它可以正常工作。 Thymeleaf 是模板系统。然后我使用 Build artifact 创建一个 jar 文件并将 jar 移动到 Linux 服务器。当我尝试访问网页时,我收到消息“模板模式“HTML”尚未配置”。
spring.thymeleaf.mode=HTML
在 application.properties 中设置
在 pom 中
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<kotlin.version>1.1.4-2</kotlin.version>
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
</properties>
<dependencies>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
<version>2.3.0</version>
</dependency>
有些东西在 Intellij 端是隐含的,但在 Linux 端却没有,但我看不出是什么。
【问题讨论】:
标签: spring-boot thymeleaf