Tell you the truth! Without 7 years of development experience, you really can't learn this SpringCloud actual combat drill document! Let's lie down!

Preface

The advantages of Spring Boot are self-evident. It simplifies the Spring MVC architecture, encapsulates its core code, and is based on annotations, abandons cumbersome XML, greatly enhances the readability and maintainability of the code, and improves Improved development efficiency. In addition, SpringBoot integrates Tomcat, which makes project deployment easy. You don't need to deploy Tomcat separately. You can use Java commands to complete the project release.

However, Spring Boot is not a distributed architecture. As the number of users of our company's projects continues to increase and the number of concurrency continues to increase, the system architecture based on Spring Boot has encountered a bottleneck. Coincidentally, a book is written. At this time, the idea of ​​microservices has gradually become popular. Whether it is technical forums or conversations between programmers, microservices are discussed. The well-known domestic Internet company Alibaba launched the Dubbo framework as early as 2012, but due to various reasons, Dubbo stopped maintenance. It was not until 2017 that Dubbo officially resumed maintenance. At this moment, Spring Cloud was born. It was based on Spring Boot and integrated the more mature microservice components on the market to form a complete set of microservice solutions.

The emergence of Spring Cloud has brought good news to developers. You will find that although there are many benefits of Spring Cloud, domestic system tutorials are rare, and practical courses are even harder to find. This article is written in this environment. The author believes that it is not advisable to learn from actual combat, only to talk about theory and not to emphasize actual combat.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

This article will provide convenience for your development work from theory to practice. I hope this article can help you learn! !

table of Contents

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

main content

This article is divided into four parts, from basic to actual combat, explaining the common components based on Spring loud.

The first part (foundation): Chapter 1~4. This part mainly explains the basic usage of Spring Boot and the HelloWorld example of Spring Cloud, leading readers to witness the style of Spring Cloud first, and lay a solid foundation for subsequent learning.

Chapter 1 Overview of Microservices; In this chapter, we first compare the pros and cons of monolithic architecture and microservice architecture, and analyze how to choose an architecture solution that suits your project. Secondly, we have a general understanding of the basic concepts of microservices, as well as the development trends and status quo of today's microservices, and then compare the current most popular microservice frameworks. Finally, combining a simple microservice architecture diagram allows readers to have a clear understanding of the microservice architecture and lay the foundation for the subsequent construction of a complete microservice framework.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 2 Spring Boot basics; through the study of this chapter, we understand the basic usage of Spring Boot and feel the elegance of YAML. This chapter covers some knowledge points that may be used in actual projects, such as common annotations, integration of Spring Boot's default engine, changes to JSON converters, and compiling and deploying applications. Finally, the more popular WebFlux framework is introduced. In the following content, we will further learn other features of Spring Boot.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 3 The core principles of Spring Boot; the core part of Spring Boot is nothing more than the initial dependency mechanism, automatic configuration management, Actuator monitoring management, and Spring Boot CLI command line tools. This chapter analyzes them separately. Through the study of the four cores, readers should have a deeper understanding of Spring Boot and lay a solid foundation for later learning Spring Cloud.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 4 Overview of Spring Cloud; In this chapter, we formally enter the learning of Spring Cloud. Any technical introductory book starts with Hello World, and this book is no exception. This chapter first introduces the basic concepts of Spring Cloud, the advantages and disadvantages of Spring Cloud and the current development situation, and then uses a simplest Spring Cloud example to demonstrate some of its core ideas, namely service registration and discovery, service gateways, and make readers familiar with Spring Cloud. With a preliminary understanding, it lays the foundation for future project development.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

The second part (actual combat): Chapter 5~10. The original intention of writing this article is actual combat-oriented, so this part accounts for the most important part, which explains the development process of actual combat projects in an all-round way.

Chapter 5: Project preparation phase; through the study of this chapter, we understand the whole process of a project from requirement analysis, product design to final architecture design. In actual projects, no matter how the process changes, these basic ideas remain the same.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 6 Public Module Encapsulation; This chapter mainly encapsulates the public modules of the blog site, that is, the methods and class libraries that each module may use to ensure the reusability of the code. Readers can also encapsulate some methods according to their own understanding and specific project requirements, and provide them to various modules to call.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 7 Registration Center: Spring Cloud Netflix Eureka; this chapter introduces the core architecture of Spring Cloud: service registration and discovery. Each service should be registered with the registration center, and the communication between services and configuration pull are all carried out through the registration center. Through the distributed management of the registry, we can easily build a highly available microservice architecture.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 8 Configuration Center: Spring Cloud Config; this chapter mainly introduces the basic usage of Spring Cloud Config, covering all aspects of Config, from configuration pull, content encryption to security authentication, readers can choose according to the actual requirements of their own projects Whether to encrypt and whether to perform security authentication.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 9 Service Gateway: Spring Cloud Gateway; this chapter introduces another major component of Spring Cloud: Service Gateway, which is the only entrance to external communication. In actual projects, we need to check the security of the interface, and there may be thousands of services in a set of microservice architecture. It is impossible to implement a separate security mechanism for each service, but should be intercepted uniformly through the service gateway. Spring Cloud Gateway implements load balancing by default. A service can be deployed to multiple servers. Through its load balancing mechanism, the concurrent processing capability of the system can be effectively improved.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 10 Function Development; In this chapter, we officially started the function development of actual combat projects. Through the study of this chapter, we have learned how to use MyBatis efficiently, simplify our persistence layer development, and also understand the security verification of the interface to achieve the purpose of improving the security of the system.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

The third part (advanced chapter): Chapter 11~13. The content of the second part is already a complete set of microservice architecture, but in actual production, it is far from enough, especially for systems with high concurrency requirements, so this part integrates advanced usage of microservices.

Chapter 11 Inter-service communication: Spring Cloud Netflix Ribbon and Spring Cloud OpenFeign; this section introduces Spring Cloud Netflix Ribbon and Spring Cloud OpenFeign. Through the comparison of the two, it is recommended that readers use OpenFeign. This component is also the most used in microservice applications. One of a wide range of components. Through OpenFeign, we can easily realize the communication between services and greatly reduce the coupling of the system. Through OpenFeign's load balancing, the stability and concurrency of calls between systems are improved, and the integrated fuse is used to further improve the stability of the application.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 12 Service Link Tracking: Spring Cloud Sleuth; As the business becomes more and more complex, a seemingly simple application may be supported by dozens or even hundreds of services in the background. A request may require multiple calls to the service to complete. When the request speed becomes slow or unavailable, we cannot know which service is causing it. At this time, we need to quickly locate the service failure point. Zipkin solves this problem well.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Through the study of this chapter, readers can understand how to realize the link tracking of microservices and store the tracking data in the hard disk so as to analyze the data offline and provide support for quickly locating the service failure point.

Chapter 13 Service Governance: Spring Cloud Consul and Spring Cloud ZooKeeper; Spring Cloud's default service governance framework is Netflix's Eureka framework, but it is not the only choice. Spring Cloud also integrates Consul and ZooKeeper for readers to choose from.

This chapter separately introduces the installation, deployment and integration of Spring Cloud Consul and Spring Cloud ZooKeeper, starting from diversified thinking, so that readers have more choices in actual development. This chapter briefly introduces the registration, discovery, and health check of the two service governance frameworks. Like Eureka, they also have many features. Due to space reasons, they are not introduced one by one. Their principles are the same as Eureka. After in-depth understanding, readers can further optimize the architecture on this basis.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

The fourth part (Deployment): Chapter 14~15. The system will eventually be released to the Internet. The traditional system release involves manual uploading and starting the application. This is not desirable in the microservice architecture, because a microservice architecture may consist of many services, and the workload of manually starting the application will be Very huge, so it is necessary for readers to understand the deployment details of distributed systems.

Chapter 14 System Release and Online; This chapter enters the system release stage, first introduces the installation and operation of the Linux operating system, then introduces the compilation and packaging of the project, and finally explains how to automatically release the system through Jenkins. Through the study of this chapter, readers can independently complete the construction and release of the system.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Chapter 15 uses Kubernetes to deploy distributed clusters; through the study of this chapter, readers can understand the whole process of Docker+K8S building a cluster environment, can also complete the construction of a cluster environment independently, and can use K8S to deploy microservice applications.

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

This [springcloud actual combat drill] has 279 pages. If you need the full version, you can forward this article to follow the editor and scan the code to get it! !

Big guy's high evaluation of this article

Without 7 years of experience, you can't really learn this SpringCloud practical exercise document

 

Guess you like

Origin blog.csdn.net/bjmashibing001/article/details/109652417