How can I test a MessageBodyWriter for a List?

前端 未结 1 1208
-上瘾入骨i
-上瘾入骨i 2021-01-26 05:07

I have a JAX-RS resource method.

@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public List<         


        
相关标签:
1条回答
  • 2021-01-26 05:33

    "How can I debug this?"

    Sometimes when errors/exceptions aren't being logged, I'll create an

    ExceptionMapper<Throwable or Exception> 
    

    and just print the stack trace. If the exception is being thrown in the JAX-RS context, it should go through the mapper.

    • See more about exception mapping
    0 讨论(0)
提交回复
热议问题