【问题标题】:How to separate Thymeleaf front-end from Spring boot project [closed]如何将 Thymeleaf 前端与 Spring Boot 项目分开 [关闭]
【发布时间】:2020-07-25 13:09:18
【问题描述】:

我是 Spring Boot 的新手。我已经创建了 Spring Boot 和 Thymeleaf 项目。我想把它分成两个项目作为前端和后端。谁能给我指路。

【问题讨论】:

  • Thymeleaf 是服务器渲染的,它不是前端。您在模板渲染期间直接引用您在控制器中生成的模型 - 那么您如何分离它呢?
  • 你说的就是HTML。欢迎你:)

标签: spring spring-boot spring-mvc thymeleaf


【解决方案1】:

Thymeleaf is a modern server-side Java template engine,它不应该作为前端项目单独工作。您应该考虑将任何 js 框架(例如 Angular/React/Vue)用作客户端和用于 rest api 的 spring boot。

【讨论】:

    猜你喜欢
    • 2020-06-19
    • 2015-01-12
    • 1970-01-01
    • 2018-09-30
    • 1970-01-01
    • 1970-01-01
    • 2018-11-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多