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
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? 🙇♂️
The text was updated successfully, but these errors were encountered:
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:
dgs-framework/graphql-dgs-spring-graphql/src/main/kotlin/com/netflix/graphql/dgs/springgraphql/autoconfig/DgsSpringGraphQLAutoConfiguration.kt
Line 243 in fb5e2f7
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? 🙇♂️
The text was updated successfully, but these errors were encountered: