Unable to find GatewayFilterFactory with name AddRequestHeadersIfNotPresent

When configuring FilterAddRequestHeadersIfNotPresent in Gateway Filter, I got an error saying Unable to find GatewayFilterFactory with name AddRequestHeadersIfNotPresent. I checked the configuration file and there was no wrong name or indentation error.

After searching for a long time, I didn't find any errors. Then I tried to use the api form to write in the configuration file under the @Configuration annotation, but I couldn't find .addRequestHeadersIfNotPresen at all. I can find the .addRequestHeader method.

It may be a problem of adding dependencies, but it conflicts with other assertion APIs. If it is a dependency problem, other APIs should not be used, so this problem has not been solved yet. Is there anyone who can solve it and see if it is What's the problem! !

Guess you like

Origin blog.csdn.net/weixin_67634317/article/details/132826760