Is there any difference between @Path with a value starting with and without /
I tested both use and everything is correct.
@Path("message")
public class MessageServices {
@PUT
@Path("sendsms")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.APPLICATION_JSON})
public Response sendSms() {
}
}
@Path("/message")
public class MessageServices {
@PUT
@Path("/sendsms")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.APPLICATION_JSON})
public Response sendSms() {
}
}
source
share