mercredi 28 mars 2018

copied jersey signature, but the 2nd isn't reached

I have this jersey java code on the server:

    @Path("/Voices")
    public class VoicesOperation {

        @Path("/search")
        @GET
        @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
        public List<VoiceUi> search(@QueryParam("q") String searchTerm) throws Exception {
...
    }


    @Path("/searching")
        @GET
        @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
        public List<VoiceUi> searching(@QueryParam("q") String searchTerm) throws Exception {
...
    }

I copied the same method twice and changed the name for the 2nd

I try to call

http://localhost:8860/Elton/Voices/search

which worked.

but

http://localhost:8860/Elton/Voices/searching

haven't.

i get in the server an error:

javax.ws.rs.NotFoundException: HTTP 404 Not Found

what am i missing?

same method was copied twice. I restarted the server of course.




Aucun commentaire:

Enregistrer un commentaire