eureka server是否可以和spring cloud gateway合并在一起,谁能提供个demo ?
使用intellij idea创建spring服务。使用向导,通过以下步骤创建服务:
File => New => Project=>Spring initializr=>dependencies =>勾选:
Eureka Server
Eureka Discovery
Gateway
Hystrix
=>完成
application.yml配置:
server:
port: 20199
eureka:
client:
service-url:
defaultZone: http://localhost:20199/eureka
Application加上
@EnableEurekaServer
@EnableEurekaClient
运行=>
报错
Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.