在microProfile项目中,我有一个FallbackHandler像这样:
public class RestFallbackHandler implements FallbackHandler<Response> {
public Response handle(ExecutionContext context) {
// code here
}
我想在响应中发送服务器的IP地址。
我尝试过这种方式: https://stackoverflow.com/a/7430038/2595658
但是wsContext.getMessageContext()
为空。
microProfile是否还有其他方法可以在后备处理程序级别获取IP地址?