'How to use spring cloud gateway spring-boot?

We were using netflix-zuul dependecy now the latest spring boot does support and we have to move to gateway.


ZuulRoute zuulRoute = new ZuulRoute();

zuulRoute.setPath("/newApi/**"); 
zuulRoute.setUrl("www.userinfo.com/user/er732/2/wecser");
zuulRoute.setSensitiveHeaders (new HashSet<String>());
final Map<String, ZuulRoute> routes = new HashMap<>();
routes.put("activity", zuulRoute); I
final ZuulProperties zuulProperties = new ZuulProperties(); z
uulProperties.setRoutes (routes);
final ZuulProperties. Host host = new ZuulProperties.Host(); host.setConnectTimeoutMillis(68000); host.setSocketTimeoutMillis(128088);
zuulProperties.setHost(host);
return zuulProperties;

How can we achieve the same with the Spring cloud gateway with the minimal changes so that my application can be running back



Sources

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

Source: Stack Overflow

Solution Source