Can I define REST API endpoint in a jar file?
Hello everyone,
I have a **maven project** (**jar**), for example, my-api. In this project, I defined a REST API endpoint:
@Path("/v1/dossiers")
public class MyAPI {
@Path("/")
public Response getDossiers() {
// our logic
return response;
}
}
I have an **ivy project**, for example, my-app and I added the jar dependency **my-api**. I can't access the API above from client
But, I tried to create a **my-api** as an ivy project (**iar**) and added it as an iar dependency my-app. It works well.
My question is: Can I define the REST API endpoint in a jar file? If yes, how can I do that?