我有以下REST端點: @Stateless
@Path("test")
public class TestResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public TestDTO test(TestDTO dt
我通過擴展jax-rs api的WebApplicationException類創建了自定義異常類。我在錯誤的輸入上拋出這個異常。 public class RestException extends WebApplicationException {
public RestException(String message, Response.Status status) {