Overriding Zuul Filter SendErrorFilter

时光怂恿深爱的人放手 提交于 2019-12-01 13:26:03

all you need to do is create a ZuulFilter and expose it as an @Bean. It needs to be in order before SendErrorFilter which is set to 0. You might need to remove "error.status_code" from the RequestContext so SendErrorFilter doesn't run.

You will need to disable a default SendErrorFilter by adding zuul.SendErrorFilter.post.disable: true to your application.properties. After this you can create your own.

property name is changed to "zuul.SendErrorFilter.error.disable"

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