I have created a jakarta
rest service projectand then when I run it, I got 404 errorthere's no interface after I visit the path.
I created these two classes:
package com.mpsoft.generateur; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; @Path("/hello-world") public class HelloResource { @GET @Produces("text/plain") public String hello() { return "Hello, World!"; } }
package com.mpsoft.generateur;import jakarta.ws.rs.ApplicationPath;import jakarta.ws.rs.core.Application;@ApplicationPath("/api")public class HelloApplication extends Application {}
And this is what I've got:
This is more details about the project: