Jira Spring应用程序插件无法访问Angular Assets文件夹

发布于 2025-01-28 03:16:57 字数 1616 浏览 3 评论 0原文

我是Jira的新手,我创建了一个应用程序,她使用了Atlassian-Scanner,而且我还包括Angular Project,所有内容都在起作用,但是当从Main.js呼叫任何REST请求时,它不起作用,不确定什么是发生的是不考虑资产文件夹或请提供帮助。

这是我的XML Web-Resource的以下代码:

<?xml version="1.0" encoding="UTF-8"?>
<bundles>
<web-resource key="client-resources" name="Client Resources">

    <resource name="assets/" type="download" location="client/assets/" />
    <resource name="main.js" type="download" location="client/main.js" />
<context>com.ngdemo.client-resources</context>
</web-resource>
</bundles>

以及我的index.html代码如下:

 <!DOCTYPE html>
<html lang="en">
<head>
    <base href="/jira/plugins/servlet/demo/" />
    <meta name="decorator" content="atl.general" />
    <meta charset="UTF-8">
    <title>Angular Demo</title>
    $webResourceManager.requireResourcesForContext("com.ngdemo.client-resources")
</head>
<body>

<app-root></app-root>

</body>
</html>

错误的URL如下:

http://localhost:2990/jira/plugins/servlet/demo/assets/i18n/en.json

但是我认为它应该像main.js:js:

 http://localhost:2990/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ufur03/713000/b6b48b2829824b869586ac216d119363/1.0.0-SNAPSHOT/_/download/resources/com.demo.ngdemo:client-resources/main.js

 http://localhost:2990/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ufur03/713000/b6b48b2829824b869586ac216d119363/1.0.0-SNAPSHOT/_/download/resources/com.demo.ngdemo:client-resources/assets/i18n/en.json

I am new to Jira and I have created one application and her I have used atlassian-scanner and also I have included angular project everything is working but when any rest request is getting called from main.js it is not working, not sure what is happening is it not considering assets folder or what please help.

Here is my below code for xml web-resource:

<?xml version="1.0" encoding="UTF-8"?>
<bundles>
<web-resource key="client-resources" name="Client Resources">

    <resource name="assets/" type="download" location="client/assets/" />
    <resource name="main.js" type="download" location="client/main.js" />
<context>com.ngdemo.client-resources</context>
</web-resource>
</bundles>

and my index.html code as below:

 <!DOCTYPE html>
<html lang="en">
<head>
    <base href="/jira/plugins/servlet/demo/" />
    <meta name="decorator" content="atl.general" />
    <meta charset="UTF-8">
    <title>Angular Demo</title>
    $webResourceManager.requireResourcesForContext("com.ngdemo.client-resources")
</head>
<body>

<app-root></app-root>

</body>
</html>

the url which is wrong it is as below:

http://localhost:2990/jira/plugins/servlet/demo/assets/i18n/en.json

but instead I think it should be as below like main.js:

 http://localhost:2990/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ufur03/713000/b6b48b2829824b869586ac216d119363/1.0.0-SNAPSHOT/_/download/resources/com.demo.ngdemo:client-resources/main.js

 http://localhost:2990/jira/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ufur03/713000/b6b48b2829824b869586ac216d119363/1.0.0-SNAPSHOT/_/download/resources/com.demo.ngdemo:client-resources/assets/i18n/en.json

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文