gateway网关实现报错: conversionServicePostProcessor重复定义

报错信息

The 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.
 

 原因是我在实现时同时引入了spring-cloud-starter-gateway和spring-boot-starter-web


    org.springframework.boot
    spring-boot-starter-web


    org.springframework.cloud
    spring-cloud-starter-gateway

 去掉 spring-boot-starter-web  即可。

你可能感兴趣的:(java,#,spring,gateway)