gpt4 book ai didi

javascript - Grails 3应用程序无法加载* .js文件

转载 作者:行者123 更新时间:2023-12-02 15:48:27 24 4
gpt4 key购买 nike

我有Grails 3应用程序。我已将前端应用程序(使用Angular 2.1构建)放置在 src / main / webapp 文件夹中。

在使用URL http://localhost:8080/加载应用程序时,我将其重定向到Index.html页面。

但是Index.html页面未加载

网址:-http://localhost:8080/static/app-name/index.html

而且我正在解决控制台中的错误。

GET http://localhost:8080/inline.js index.html:14

GET http://localhost:8080/main.78fb007fcde8966a4e95.bundle.js index.html:14

GET http://localhost:8080/styles.d63e17da56bb3a1ca523.bundle.js index.html:14

GET http://localhost:8080/main.78fb007fcde8966a4e95.bundle.js 404 ()

最佳答案

对其进行更改,以免从/static网址获取资源:
application.yml:

grails:
resources:
pattern: /**

关于javascript - Grails 3应用程序无法加载* .js文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43497294/

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