gpt4 book ai didi

javascript - SpringBoot Angular 应用程序不提供所有 js 文件

转载 作者:行者123 更新时间:2023-11-28 23:21:03 25 4
gpt4 key购买 nike

我们有一个通过 SpingBoot 应用程序提供的 Angular 应用程序。当最初开发该应用程序的开发人员编译 WAR 包并将其部署在 TOMCAT 服务器上时,一切正常。

但是当其他人克隆源代码并尝试构建和运行相同的代码时它不起作用,最终会在浏览器控制台中给出以下错误。似乎没有提供“某些”静态内容。可以确认给定的文件与提供的其他 js 文件就位。

localhost/:40 GET http://localhost:8080/js/angular-jwt/dist/angular-jwt.js 
localhost/:41 GET http://localhost:8080/js/angular-storage/dist/angular-storage.js
localhost/:42 GET http://localhost:8080/js/auth0-angular/build/auth0-angular.min.js
localhost/:40 GET http://localhost:8080/js/angular-jwt/dist/angular-jwt.js
(index):41 GET http://localhost:8080/js/angular-storage/dist/angular-storage.js
(index):42 GET http://localhost:8080/js/auth0-angular/build/auth0-angular.min.js

我们没有明确配置任何 MVC 配置,而是依赖于 Boot 的默认设置。 IE。我们已将所有静态内容放在 /src/resources/static/ 目录中,据称该目录默认为启动服务。所以现在它看起来像下面,

enter image description here

P.S.:构建系统目前是 Maven。非常感谢任何帮助。

最佳答案

这个问题已经解决了。由于 .gitignore 文件处理不当,它只是捆绑在 Angular 依赖项中的几个文件没有被推送到上游存储库。一个可怜的错误。

关于javascript - SpringBoot Angular 应用程序不提供所有 js 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43752523/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com