RestEasy Post Process Interceptor chain not traversed when response created by ExceptionMapper

大兔子大兔子 提交于 2019-12-05 09:26:10

Post processors do not get called if an exception is thrown. They are on different, parallel resolution paths:

           / 'Normal' JAX-RS response -> Post Processors -> Message Body Writers
Processing
           \  Exception -> Exception Mappers

If you have logic that needs to be run in both your post processors and exception mappers then you will need to incorporate it in both (preferably through a common, utility class).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!