Hi, we have an application that has spring hateoas as a dependency and are in process of migration from old starter DGS starter to new one. Their configuration inside org.springframework.hateoas.config.WebFluxHateoasConfiguration contains following bean
@Bean
@Lazy
ServerWebExchangeContextFilter serverWebExchangeContextFilter() {
return new ServerWebExchangeContextFilter();
}
Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'serverWebExchangeContextFilter' defined in class path resource [org/springframework/hateoas/config/WebFluxHateoasConfiguration.class]: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=true; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.hateoas.config.WebFluxHateoasConfiguration; factoryMethodName=serverWebExchangeContextFilter; initMethodNames=null; destroyMethodNames=[(inferred)]; defined in class path resource [org/springframework/hateoas/config/WebFluxHateoasConfiguration.class]] for bean 'serverWebExchangeContextFilter' since there is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.netflix.graphql.dgs.springgraphql.autoconfig.DgsSpringGraphQLAutoConfiguration$ReactiveConfiguration; factoryMethodName=serverWebExchangeContextFilter; initMethodNames=null; destroyMethodNames=[(inferred)]; defined in class path resource [com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration$ReactiveConfiguration.class]]
Could you please add some condition, so that filter gets created only in case it does not already exist? :bowing_man:
Hi, we have an application that has spring hateoas as a dependency and are in process of migration from old starter DGS starter to new one. Their configuration inside
org.springframework.hateoas.config.WebFluxHateoasConfiguration
contains following beanwhich is also defined by DGS: https://github.com/Netflix/dgs-framework/blob/fb5e2f7404131feee7e9e16f9135e0fa5e68ec23/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt#L243
Expected behavior
App starts as expected
Actual behavior
App crashes on BeanDefinitionOverrideException
Could you please add some condition, so that filter gets created only in case it does not already exist? :bowing_man: