You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow forward scheme for spring cloud gateway mvc similar to its webflux counterpart for declarative configuration using application properties or yaml
#3188
Closed
mrinmoykhamrui opened this issue
Dec 19, 2023
· 2 comments
Is your feature request related to a problem? Please describe.
webflux gateway allows forwarding using dispatcher handler (ForwardRoutingFilter) declaratively using application properties and yaml. Similar capability seems not available in mvc version of it.
Describe the solution you'd like
Ability to use forward scheme to configure gateway routes in application properties or yaml files. Any before filters applied on the request should be visible in the forwarded target
Describe alternatives you've considered
HandlerFunctions.forward is available for DSL based configuration however it seems any before filters applied on the request is not visible to the forward target.
The text was updated successfully, but these errors were encountered:
Caused by: java.lang.IllegalStateException: Unable to find HandlerFunction for scheme: forward
at org.springframework.cloud.gateway.server.mvc.config.GatewayMvcPropertiesBeanDefinitionRegistrar.getRouterFunction(GatewayMvcPropertiesBeanDefinitionRegistrar.java:197) ~[classes/:na]
at org.springframework.cloud.gateway.server.mvc.config.GatewayMvcPropertiesBeanDefinitionRegistrar.lambda$routerFunctionHolderSupplier$1(GatewayMvcPropertiesBeanDefinitionRegistrar.java:145) ~[classes/:na]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
at org.springframework.cloud.gateway.server.mvc.config.GatewayMvcPropertiesBeanDefinitionRegistrar.routerFunctionHolderSupplier(GatewayMvcPropertiesBeanDefinitionRegistrar.java:144) ~[classes/:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1257) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:951) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1217) ~[spring-beans-6.1.4.jar:6.1.4]
... 120 common frames omitted
Is your feature request related to a problem? Please describe.
webflux gateway allows forwarding using dispatcher handler (ForwardRoutingFilter) declaratively using application properties and yaml. Similar capability seems not available in mvc version of it.
Describe the solution you'd like
Ability to use forward scheme to configure gateway routes in application properties or yaml files. Any before filters applied on the request should be visible in the forwarded target
Describe alternatives you've considered
HandlerFunctions.forward is available for DSL based configuration however it seems any before filters applied on the request is not visible to the forward target.
The text was updated successfully, but these errors were encountered: