【问题标题】:how can i use angularjs with spring boot and thymeleaf? is there a template project? [closed]我如何将 angularjs 与 spring boot 和 thymeleaf 一起使用?有模板项目吗? [关闭]
【发布时间】:2015-01-12 21:40:15
【问题描述】:

如何将 angularjs 与 spring boot 和 thymeleaf 一起使用?有模板项目吗?

我已经用谷歌搜索了,但我没有找到任何东西。请帮帮我!

我的项目现在在服务器端使用 angularjs 和简单的 servlet。我想用 spring-boot 替换我的服务器端代码,但 spring-boot 使用 thymeleaf 作为默认模板渲染引擎。我现在的问题是 我不能同时使用 angularjs 和 thhymeleaf。他们彼此不友好。所以任何人都知道解决方案,或者是否有模板项目同时使用这两个主题。

【问题讨论】:

    标签: angularjs spring-boot thymeleaf


    【解决方案1】:

    除非您将 Thymeleaf 添加到项目中,否则 Spring Boot 不会使用它。如果您不想要 Thymeleaf,只需将其从项目的 pom.xml 中删除即可。

    将你的 Angular 资源放在 resources/static 中,Boot 会默认提供它,而不需要任何 Thymeleaf。

    【讨论】:

    • 最后,我按照你说的做对了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-19
    • 2014-06-12
    • 2019-10-31
    • 2016-01-26
    • 2018-09-19
    • 1970-01-01
    • 2015-07-12
    相关资源
    最近更新 更多