mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-20 17:22:51 +08:00

* #580 added failing test * #580 added failing test for dynamic reroutes * #580 added failing test for validator * #580 validation tests passing * #580 acceptance tests passing * #580 got rid of the list in sdp factory * +semver: breaking #580 service discovery provider returned by delegate must be the same as name in config, this is a breaking change because you have to specify consul now * #580 removed use servide discovery property from file config, we dont need it, just use the service name as indicator the user wants to use service discovery for the given reroute
#Example how to use Eureka service discovery
I created this becasue users are having trouble getting Eureka to work with Ocelot, hopefully this helps. Please review the implementation of the individual servics to understand how everything fits together.
##Instructions
-
Get Eureka installed and running...
$ git clone https://github.com/spring-cloud-samples/eureka.git $ cd eureka $ mvnw spring-boot:run
Leave the service running
-
Get Downstream service running and registered with Eureka
cd ./DownstreamService/ dotnet run
Leave the service running
-
Get API Gateway running and collecting services from Eureka
cd ./ApiGateway/ dotnet run
Leave the service running
-
Make a http request to http://localhost:5000/category you should get the following response
["category1","category2"]