且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何自定义HTTP标头添加到JAX-RS的反应?

更新时间:2023-02-16 23:32:43

尝试添加响应对象作为返回值,在这里你可以设置标题..

Try to add Response Object as your return value where you can set Headers..

Response.ok(/* some entity */).header("CustomHeader", "CustomValue").build();

您不需要使用拦截器