【问题标题】:Thymeleaf configuration with springORM applcation使用 Spring ORM 应用程序配置 Thymeleaf
【发布时间】:2019-06-05 14:43:16
【问题描述】:

我需要在 SpringORM 应用程序中使用 thymeleaf 而不是 jsp,我正在寻找用于此目的的配置设置。

【问题讨论】:

  • 谷歌同样的东西你会得到很多结果。

标签: thymeleaf spring-orm


【解决方案1】:

https://start.spring.io/ 创建一个简单的 Spring Boot 项目,然后将 thymeleaf 添加到您的 maven 存储库中,如下所示

<dependency>
    <groupId>org.thymeleaf</groupId>
    <artifactId>thymeleaf-spring3</artifactId>
    <version>3.0.11.RELEASE</version>
</dependency>

注意:您还可以在创建项目时选择 thymeleaf 作为依赖项。

【讨论】:

  • 它给我错误“解析模板时出错 [hello],模板可能不存在或可能无法被任何已配置的模板解析器访问”
  • 你必须将 hello.html 保存在模板文件夹中
  • 我已经把它放在模板文件夹中了,但它仍然给出同样的错误
猜你喜欢
  • 2013-07-02
  • 2013-10-03
  • 1970-01-01
  • 1970-01-01
  • 2018-07-02
  • 1970-01-01
  • 2016-06-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多