'SpringCloud gateway response error jump to a custom page in response to a global exception

I am using springcloud gateway, I want to handle some global exceptions, for example 404, when I catch this exception, I want to jump to a custom page instead of returning json type data. What should I do.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source