Spring Cloud Learning
repository·master·Indexed 27 days ago
https://github.com/dyc87112/springcloud-learningA collection of code samples and tutorials for Spring Cloud microservices architecture. It covers multiple versions including Brixton, Dalston, and Finchley, with detailed guides on service registration and discovery (Eureka, Consul, Nacos), service consumers (Ribbon, Feign), circuit breakers (Hystrix), distributed configuration, API gateways (Zuul), message buses (RabbitMQ, Kafka), and distributed tracing (Zipkin, Logstash). Additionally, it includes Spring Cloud Alibaba tutorials for Nacos, Sentinel, and Dubbo, as well as source code analysis for core components.
What's inside springcloud-learning
- This repository contains program samples and code examples for Spring Cloud tutorials. It is designed to help developers learn microservices architecture, source code analysis, and practical Spring Cloud tips.
Explore Spring Boot and Microservices Resources
masterIn addition to the Dalston Spring Cloud series, the following learning resources are available:
- Spring Boot Fundamentals: Spring Boot基础教程
- Spring Boot 2.0 Features: Spring Boot 2.0新特性
- Spring Cloud Fundamentals: Spring Cloud基础教程
- Microservices Architecture Special Topics: 微服务架构专题
Run Sentinel Dashboard Frontend in local development mode
masterTo start the local development server for the Sentinel Dashboard Frontend, use thenpm startcommand. Ensure you have Node.js version > 6.x installed.npm startAccess Spring Cloud Alibaba tutorials
masterThe repository provides a comprehensive series of tutorials for Spring Cloud Alibaba, covering Nacos (Service Discovery & Configuration), Sentinel (Flow Control), and Dubbo (RPC).
Key topics include:
- Nacos: Service registration/discovery, production-grade usage, service consumption (RestTemplate, WebClient, Feign), configuration management (loading rules, multi-environment, shared config), data persistence, and cluster deployment.
- Sentinel: Interface rate limiting, rule storage using Nacos or Apollo, and detailed usage of the
@SentinelResourceannotation. - Dubbo: Integration with Spring Cloud Alibaba.
Start the Sentinel Dashboard Frontend development server
masterRun the development server to start working on the frontend locally.
npm startAccess Spring Cloud source code analysis
masterDeep-dive technical articles analyzing the internal workings of key Spring Cloud components:
- Eureka source code analysis.
- Ribbon source code analysis.
- Zuul core filters analysis.
Access Spring Cloud practical tips and troubleshooting
masterA series of 'Practical Tips' for common real-world scenarios and troubleshooting:
- Managing version dependencies.
- Using random ports and health checks.
- Zuul-specific issues: Cookie/redirect handling and unified exception handling.
- Ribbon/Zuul: Eager-load (hunger load) patterns.
- Feign: Inheritance features (Pseudo-RPC mode).
- Monitoring: Using Spring Boot Actuator, Jolokia, and Grafana.
- Distributed locks and semaphores using Consul.
Access the Spring Cloud Dalston Series Tutorials
masterThis repository contains program examples for the Spring Cloud tutorial series. The 'Dalston' version of the series covers building microservice architectures using the following topics:
- Service Registration & Discovery: Eureka, Consul
- Service Consumers: Basic usage, Ribbon, Feign (including file transfers)
- Distributed Configuration: Configuration centers
- Fault Tolerance: Hystrix (service degradation, dependency isolation, circuit breakers, monitoring panels, and data aggregation)
- Service Gateway: Basic usage, routing configuration, filters, and Swagger API documentation integration
- Message-Driven Microservices: Core concepts, consumer groups (handling duplicate consumption), and message partitioning
- Distributed Tracing: Principles, integration with Logstash and Zipkin, and sampling collection
Run Sentinel Dashboard Frontend in development mode
masterStart the local development server to work on the Sentinel Dashboard Frontend.
npm startSet up the Sentinel Dashboard Frontend environment
masterTo run or build the Sentinel Dashboard Frontend, ensure you have the following environment requirement met:
- Node.js: version > 6.x
Access Spring Cloud Stream tutorials
masterSpecific guides for Spring Cloud Stream (Finchley version) are available, focusing on message consumption and error handling:
- Consuming self-produced messages.
- Message dispatching based on content within the same channel.
- Implementing scheduled tasks using delayed messages (RabbitMQ).
- Error handling strategies: Automatic retries, custom error logic, Dead Letter Queues (DLQ) with RabbitMQ, and re-queuing with RabbitMQ.
Access Spring Cloud Brixton version tutorial examples
masterThis repository contains program samples for Spring Cloud tutorials. The Brixton version examples cover microservices architecture topics including service registration and discovery, service consumers, circuit breakers, distributed configuration centers, service gateways, high-availability service registries, and message buses (RabbitMQ and Kafka).