• Stars
    star
    236
  • Rank 170,480 (Top 4 %)
  • Language
    Java
  • Created almost 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example of using feign with eureka

feign-eureka

Example of using feign with eureka

Assumes eureka (from spring-cloud-samples) is running on http://localhost:8761

building

mvnw package

hello server

run java -jar server/target/feign-eureka-hello-server-0.0.1-SNAPSHOT.jar

verify it is functioning at http://localhost:7111

You should see Hello World: HelloServer:myhostname:7111

hello client

run java -jar client/target/feign-eureka-hello-client-0.0.1-SNAPSHOT.jar

verify it is functioning at http://localhost:7211

You should see Hello World: HelloServer:myhostname:7111

hello client error

You may see an error while the eureka/loadbalancer caches warm up similar to the following:

Load balancer does not contain an instance for the service HelloServer

It should go away shortly.

See round robin load-balancing in action

run java -jar server/target/feign-eureka-hello-server-0.0.1-SNAPSHOT.jar --server.port=7112

Go back to http://localhost:7211 and you should see both ports 7111 and 7112 in the output after a minute or two as you keep refreshing.

More Repositories

1

eureka

Java
500
star
2

customers-stores

Two microservices for customers and stores
Java
431
star
3

spring-cloud-contract-samples

Samples for Spring Cloud Contract project
Java
379
star
4

configserver

Java
371
star
5

spring-cloud-gateway-sample

Sample Spring Cloud Gateway Application
Java
360
star
6

brewery

Brewing beer with Spring Cloud has never been that easy...
Java
353
star
7

config-repo

Configuration files for the server sample
138
star
8

bookstore-service-broker

Sample application for Spring Cloud Open Service Broker
Java
72
star
9

spring-cloud-circuitbreaker-demo

Samples demonstrating how to using Spring Cloud Circuitbreaker
Java
64
star
10

spring-cloud-sleuth-samples

Contains isolated samples of Spring Cloud Sleuth
Java
23
star
11

spring-cloud-contract-nodejs

Spring Cloud Contract with Node JS application
Shell
22
star
12

spring-cloud-config-vault

Sample application demonstrating how to use Hashicorp Vault as a backend for a Spring Cloud Config server
Java
16
star
13

svn-config-server

Sample Config Server and Config Client. The Config Server is configured to use Subversion rather than git
Java
16
star
14

spring-cloud-app-broker-samples

Sample apps for https://github.com/spring-cloud/spring-cloud-app-broker
Java
8
star
15

spring-cloud-square-retrofit-web

Demo project for Spring Cloud Square Retrofit Web
Java
3
star
16

sleuth-issues

Samples for Sleuth that replicate issues
Java
2
star
17

spring-cloud-function-samples

1
star
18

spring-cloud-square-retrofit-webclient

Java
1
star
19

spring-cloud-intro-demo-config

Centralised Configuration for Spring Cloud Intro Demo
1
star
20

spring-cloud-contract-nodejs-external-contracts

External contracts for the Spring Cloud Contract NodeJS sample
Java
1
star