finds.dev← search

// the find

dyc87112/SpringCloudBook

★ 572 · Java · updated Jan 2017

《Spring Cloud微服务实战》配套示例代码

Companion code for a Chinese-language book on Spring Cloud. Each directory covers one piece of the Netflix-era stack: Eureka with a two-peer HA setup, a config server with profile-specific property files, Ribbon and Feign consumers, Hystrix, Zuul, Spring Cloud Stream, and tracing. It suits readers working through the book who want runnable examples beside the text, not a guide to what to build on today.

- Each component gets its own directory, so you can start one example without untangling the rest. The layout works as a table of contents.

- eureka-server-ha uses peer-specific property files (application-peer1 and application-peer2) to run a replicated Eureka pair on one machine, which is the usual way to demo peer registration.

- config-repo keeps a shared didispace.properties next to -dev, -test and -prod variants, which shows how profile-specific files override the base file.

- api-gateway-dynamic-filter loads Groovy pre and post filters at runtime, and feign-consumer's HelloServiceFallback shows a Hystrix fallback class. Both show a pattern in a few files.

- Last push was January 2017. Hystrix is in maintenance mode, Zuul 1 has been superseded by Spring Cloud Gateway, and Eureka is no longer the default choice for new projects, so this shows the 2017 way to do each job.

- The README has no run instructions. Running the examples means starting Eureka and the config server first, then a message broker for the bus and stream modules, and that order is not written down in the repo.

- Test coverage is close to nothing. The only test files are generated HelloApplicationTests context-load stubs in rabbitmq-hello, spring-boot-hello and stream-consumer.

- There is a duplicate config repo at spring_cloud_in_action/config-repo alongside config-repo, and a keystore is committed under config-server/src/main/resources. Both are harmless in a demo, but they are easy to copy into something real.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →