0

我正在使用 jhipster 4.14.4 版来生成 jhispter 网关。在本地一切正常。

我使用下面的命令来编译war文件,就像通常用于“单体应用程序”一样。

"Mvnw package -Pprod -DskipTests"

部署到服务器时显示空白页面。注册表/微服务/网关启动时没有任何错误。但是浏览器 F12 控制台中的网关页面出现如下错误:

Failed to load resource: the server responded with a status of 404 (Not Found) global.7f47cf62bb4699a8e4e2.bundle.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found) vendor.7f47cf62bb4699a8e4e2.bundle.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found) manifest.7f47cf62bb4699a8e4e2.bundle.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found) polyfills.7f47cf62bb4699a8e4e2.bundle.js:1 

但是,global/vendor/manifest/polyfills 文件存在于 war 文件“app”文件夹中。

我确实尝试过

  1. 部署一个全新的生成网关,而不需要对服务器进行任何更改。
  2. 浏览器清除缓存并重新部署。
  3. 再次删除 node_modules 和 npm install 。
  4. 清理包,编译war文件

仍然有同样的问题。

4

1 回答 1

0

你试过“mvnw package -Pprod,webpack -DskipTests”吗?

于 2021-06-23T17:24:53.620 回答