【问题标题】:How to import Angular application created using Node.js and the "ng new" command into a Spring Boot application?如何将使用 Node.js 和“ng new”命令创建的 Angular 应用程序导入 Spring Boot 应用程序?
【发布时间】:2019-04-16 06:52:59
【问题描述】:

我已经使用“ng new”命令创建了一个 Angular 应用程序,我可以在 Node.js 服务器上运行它。

但我想做的是在与我的 Spring Boot 应用程序相同的服务器上运行 Angular 应用程序。我的 Spring Boot 应用程序在 Tomcat 服务器上运行。

我可以将 Angular 应用程序文件复制到 Spring Boot 应用程序中的资源文件夹吗?我是复制所有内容还是只复制一些文件?我需要为这些文件创建文件夹结构吗?这行得通吗?如果没有,有没有其他方法可以做到这一点?

【问题讨论】:

    标签: node.js spring angular spring-boot


    【解决方案1】:

    您可以使用 ng build --prod 创建 Angular 应用程序的构建 之后,您可以将 dist 文件夹放在 Apache 目录中的 angular 项目根位置。有关角度部署的更多信息,您可以使用此链接 https://angular.io/guide/deployment

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-18
      • 2019-07-01
      • 2018-09-07
      • 2021-02-26
      • 2019-08-31
      • 2014-12-07
      • 2021-10-09
      • 2019-05-02
      相关资源
      最近更新 更多