Skip to content

It's easy setup a cloud service if you use spring-cloud. This is a basic example, you can create a microservice base on it.

Notifications You must be signed in to change notification settings

borgle/spring-cloud-sample

Repository files navigation

spring-cloud-sample

It's easy setup a cloud service if you use spring-cloud. This is a simple example, you can create a microservice base on it.

ready

You need jdk 1.8 or later.

clone

git clone https://github.com/borgle/spring-cloud-sample.git --depth=1

build

./mvnw install

run

java -jar ./ts-registry/target/registry-server.jar
java -jar ./ts-config/target/config-server.jar
java -jar ./ts-zipkin/target/zipkin-server.jar
#java -jar ./ts-turbine/target/turbine-server.jar
#java -jar ./ts-hystrix/target/hystrix-server.jar
java -jar ./ts-monitor/target/monitor-server.jar
java -jar ./ts-gateway/target/api-gateway.jar
java -jar ./ts-client-feign/target/client-feign.jar
# java -jar ./ts-client-ribbon/target/client-ribbon.jar
java -jar ./ts-business-a/target/business-a.jar
java -Dspring.profiles.active=another -jar ./ts-business-a/target/business-a.jar

check

curl http://localhost:8080/feign/test
curl http://localhost:8080/feign/timeout
ps -ef | grep business-a | awk '{print $2}'|xargs kill
sleep 30
curl http://localhost:8080/feign/test

monitor

other

Best wishes! Thanks.

Packages

No packages published

Languages