Hello,
I’m trying to upgrade my plugin to Jira 10.3. I moved all the dependencies to use Platform 7.3.3, Jakarta, Java 17, velocity allowlist, etc. However, the rest resources of my plugin are all returning 404 Not Found. Even if I try with a very simple resource:
import com.atlassian.plugins.rest.api.security.annotation.UnrestrictedAccess;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
/**
* Hello World Resource.
*
* @author Author
*/
@Path("/hello")
public class HelloWorld {
@Inject
public HelloWorld() {
System.out.println("Hello World");
}
@GET
@UnrestrictedAccess
public String hello() {
return "HELLO";
}
}
Response
<status>
<status-code>404</status-code>
<message>HTTP 404 Not Found</message>
</status>
The resource doesn’t seem to be registered properly. I’m not sure what I’m doing wrong, can you advise how to register REST resources with REST v2?
Also would having jersey in the dependencies have an effect?
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8</version>
</dependency>
Thanks,
Yohan