ฉันกำลังพยายามสร้างส่วนเสริม HelloWorld ง่ายๆ โดยใช้ atlassian-connect-play-java :
ตัวควบคุมของฉัน:
package controllers;
import views.html.*;
import com.atlassian.connect.play.java.controllers.AcController;
import com.google.common.base.Supplier;
import play.mvc.Controller;
import play.mvc.Result;
public class Application extends Controller {
public static Result index()
{
return AcController.index(home(), descriptor());
}
private static Supplier<Result> descriptor()
{
return new Supplier<Result>()
{
@Override
public Result get()
{
return AcController.descriptor();
}
};
}
private static Supplier<Result> home()
{
return new Supplier<Result>()
{
@Override
public Result get()
{
return ok(index.render("Hello"));
}
};
}
}
ไฟล์เส้นทางของฉัน:
GET / controllers.Application.index()
GET /assets/*file controllers.Assets.at(path="/public", file)
-> / ac.Routes
ไฟล์ดัชนีของฉัน: scala.html:
@(message: String)
@main("Welcome to Play") {
<p>@message</p>
}
ไฟล์ main.scala.html ของฉัน:
@(title: String)(content: Html)
<!DOCTYPE html>
<html>
<head>
<title>@title</title>
<script src="http://localhost:1990/confluence/atlassian-connect/all.js" type="text/javascript"></script>
<link rel="stylesheet" href="/th//aui-cdn.atlassian.com/aui-adg/5.4.3/css/aui.css" media="all">
<link rel="stylesheet" media="screen" href="/[email protected]("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="/[email protected]("images/favicon.png")">
<script src="@routes.Assets.at("javascripts/jquery-1.9.0.min.js")" type="text/javascript"></script>
</head>
<body>
<div class="ac-content">
<p>@content</p>
</div>
</body>
</html>
ไฟล์ atlassian-connect.json ของฉัน:
{
"key": "${addonKey}",
"name": "${addonName}",
"description": "Atlassian Connect add-on",
"baseUrl": "${localBaseUrl}",
"vendor": {
"name": "Atlassian",
"url": "http://www.atlassian.com"
},
"authentication": {
"type": "none"
},
"modules": {
"generalPages": [
{
"url": "/",
"key": "test-application",
"location": "system.user",
"name": {
"value": "Test"
}
}
]
},
"scopes": ["READ"]
}
เมื่อเรียกใช้แอปพลิเคชัน play ทุกอย่างทำงานได้ดี
แต่เมื่อฉันติดตั้งปลั๊กอินบนอินสแตนซ์ภายในของ Confluence และเปิดใช้งาน เนื้อหาของส่วนเสริมไม่เคยหยุดโหลด ฉันได้รับข้อความต่อไปนี้:
ส่วนเสริมไม่ตอบสนอง รอหรือยกเลิก?
ฉันพยายามค้นหาปัญหาแต่ทำไม่ได้ ใครสามารถช่วยได้บ้าง