我有以下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) {