看来您的资源方法不在
public范围内。尝试这个:
import javax.ws.rs.*;import javax.ws.rs.core.Response;@Path("/test")public class baseResource { @GET @Produces("text/plain") @Path("test") public Response helloWorld() { return Response.ok("Hello world","plain/text").build(); } @GET @Produces("text/plain") public String helloWorld2() { return "Hello world without path!"; }}


