Rest | @Produces and @Consumes : why dont they both get called for same MIME-type
问题 a newbie in JAX-REST (jersey 1.8 impl) I have a class for Resource "/hello" package com.lbs.rest; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("/hello") public class Test { //-- produces MIME type text/plain @GET @Produces(MediaType.TEXT_PLAIN) public String thankYouTxt(){ System.out.println("thankYouTxt"); return "thankYouTxt\n"; } //-- consumes MIME type text/plain @GET @Consumes(MediaType