dany giguere
03/27/2024, 10:30 PMThe bean 'conversionServicePostProcessor', defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
I don’t understand how I have both …web/configuration/WebSecurityConfiguration.class and …web/reactive/WebFluxSecurityConfiguration.class. I also tried to set the allow-bean-definition-overriding to true but somehow I always get a 401 when trying to reach my api. I guess I need both beans. You can view my SecurityConfig on this repo: https://github.com/danygiguere/graphql-microservice/blob/JWT/bff/src/main/kotlin/com/example/bff/configuration/SecurityConfig.kt. The strange thing is that I implemented the same SecurityConfig in the same repo under the users-service and it works fine. Anyone would happen to know what is going on ?Szymon Jeziorski
03/28/2024, 7:01 AMcom.netflix.graphql.dgs:graphql-dgs-spring-boot-starter
looks to be configured strictly for spring mvc. It brings spring-boot-starter-web
with itself which causes the clash with your webflux setup.
Replace it with webflux variant: com.netflix.graphql.dgs:graphql-dgs-webflux-starter
and you should be good to godany giguere
03/28/2024, 11:00 AM