Ancient kite, a technical public number not only technology. The Spring Cloud series is complete, and you can check out the full series on my Github.
This series has been written intermittently for a long time, and the main components are all finished. Many students have read it and added me to wechat to say that they found the most detailed tutorial. Basically, they can run with 100% success.
I have specially compiled a PDF version for offline reading. If you need it, you can search the official wechat account “Ancient Kite”, or scan the QR code at the end of the article to follow me, and reply to “PDF” in the official account to get the offline VERSION of PDF tutorial, 160 pages of detailed tutorial, text, text, source code comparison study, to help you quickly learn Spring Cloud.
You can think of this series as a Spring Cloud scaffolding project and just copy it when you need it, preferably after you understand the configuration process and principles.
The following is the version of JDK, Spring Cloud and Spring Boot used in the scaffolding project. The latest version of Spring Cloud is Greenwich SR2 at the time of writing, and now it is Hoxton SR3. There are some changes compared to the previous version. I will write some new content for Hoxton in the future, so you can follow me.
Composition and overview of Spring Cloud
Spring Cloud is a large collection of mature frameworks, including configuration center, registry, responsible balancing, fuse handling, and so on, packaged in Spring Boot for developers to use.
It can be described as a one-stop service in the micro service industry. Only you can think of, there is nothing you can’t find.
If you’re going to learn about Spring Cloud, check me out first
Registry Eureka
Eureka is an open source service registration and discovery component of Netflix. Service discovery can be said to be the core function of micro-service architecture. After micro-service deployment, there must be service registration and discovery capabilities, and Eureka is playing this role. If you’ve used Dubbo, you know that the service registration and discovery functions in Dubbo are implemented using ZooKeeper.
Eureka is currently in version 2.x and has officially announced that it will not be maintained and updated. But Eureka is stable enough to be a registry. Spring Cloud integrates with Eureka and is fully packaged. Convenient when we use Spring Boot development simple configuration can be used.
Spring Cloud Eureka implementation service registration and discovery point I view the source code
Spring Cloud Eureka implementation of security control points I view the source code
Spring Cloud Eureka implementation of high availability service discovery registry point I view the source code
Spring Cloud Config Configuration center
Spring Cloud Config is the earliest configuration center in the Spring Cloud family. Although Consul was later released to replace the configuration center function, Config is still suitable for Spring Cloud projects and can be implemented with simple configuration.
Spring Cloud Config implementation configuration center point I view the source code
Next-generation registry and configuration center Consul
All-around player “Consul”. HashiCorp is a tool for service discovery and service configuration. Developed with go language, it has good portability. Included in Spring Cloud, Eureka has stopped developing new versions and is more likely to let developers use Consul to register discovery as a service.
Both can be registry can be configuration center Consul point all-rounder I view the source code
The messaging middleware Spring Cloud Stream
Spring Cloud Stream is a messaging middleware component that integrates Kafka and RabbitMQ. The following article introduces the use of Spring Cloud Stream based on the Rabbit MQ messaging middleware system. If you haven’t used messaging middleware before, check out the RabbitMQ website or follow this tutorial. If you understand the design of messaging middleware, you can use it better.
The most complete Spring Cloud component – Messaging middleware Spring Cloud Stream using tutorial points I view the source code
Spring Cloud Gateway Gateway
The gateway provides services such as request routing and combination, protocol translation, security authentication, service authentication, traffic control, and log monitoring. There are many alternative gateways, such as Nginx, OpenResty, Linkerd, and Spring Cloud Gateway.
If you are really looking for high performance, you should definitely choose Nginx or OpenResty, but if you don’t have high performance requirements and you are using the Spring Cloud family, you should definitely choose Spring Cloud Gateway.
Spring Cloud Gateway point I view the source code
The authentication service Spring Cloud OAuth2
OAuth2 is actually a network standard about authorization, it develops the design ideas and operation process, using this standard we can actually achieve OAuth2 authentication process. Spring-cloud-starter-oauth2 is an implementation of Spring Cloud encapsulated in oAuth2 standard and spring-Security.
Realized OAuth2 single sign-on two modes, one is password mode, the other is authorization code mode, integrated wechat login is the authorization code mode.
Probably the most detailed Spring Cloud OAuth2 single sign-on tutorial on the web
Spring Cloud OAuth2 License pattern tutorial
Click me to view the source code
If anyone asks you again for the Spring Cloud tutorial and reference code, you can pass this article on to him.
Creation is not easy, small praise, big warm, very helpful to me. Don’t mention it. Like me!
If you search the official wechat account “Ancient Kites”, you can also scan the qr code below. After attention can be added wechat, and the group of small partners exchange learning, there are also many big factory partners ah.