gpt4 book ai didi

java - 无法设置 app.js 的正确路径

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:42 24 4
gpt4 key购买 nike

我正在使用 AngularJS 在 Java 中开发 Web 应用程序。我的问题是 app.js 和 app.css 文件出现 404 错误。

index.html 的路径

webapp/WEB-INF/app/pages/index.html

app.js 的路径

webapp/WEB-INF/app/js/app.js

app.css 的路径

webapp/WEB-INF/app/css/app.css

连接 html 中的 css 和脚本:

<link rel="stylesheet" type="text/css" href="/css/app.css" media="all" />
<script type="text/javascript" src="/js/app.js"></script>

正确的路径应该是什么?

最佳答案

我已经找到解决办法了。我使用的是 lineman,lineman 在“生成”文件夹中创建了真正的 index.html。

关于java - 无法设置 app.js 的正确路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44399669/

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