I have controller in my api gateway service:
@GetMapping("/test")
And I have the same endpoint in one of my routes.
When I call /test, my request get routed, how can I increase priority of Spring Controllers over zuul routing?
You could use add a route to your controller using forward in front of your path, for example:
zuul:
routes:
controller:
path: /test
url: forward:/test
other:
...
and place it before your other route definition, in case of YAML file it will preserve an order.
I haven't tested above example, but I use a similar solution and it works fine.