The most complete introduction to SpringCloudAlibaba in history takes you in-depth from scratch ♂ Learning - environment building

Spring cloud Alibaba (I) -- environment construction

Introduction to spring cloud Alibaba

springcloud

The spring team has an open source microservice tool set to help us quickly build distributed systems (microservice systems) and provide netflix for spring organizations

springcloud alibaba

The open source microservice toolset of alibaba team helps us quickly build distributed systems (microservice systems) and provide alibaba solutions

springcloud alibaba is a one-stop solution provided by alicloud for distributed application development. It contains all the components needed to develop distributed applications, making it easy for you to develop applications using spring cloud.
With Alibaba cloud, you only need to add some annotations and a few configurations to connect Spring cloud applications to Alibaba's distributed solutions and build a distributed application system with Alibaba middleware.

spring cloud alibaba features

technical supportspringcloud alibabaspringcloud netflix
Service degradation and flow controlsentinelhystrix
Service registration and discoverynacoseureka ,consul
Distributed configuration & event driven message busnacosconfig & bus
Distributed transaction & Dubboseta

Get information

Spring cloud component

technical supportspringcloud alibabaspringcloud netflix
Service registration and discovery componentnacoseureka consul
Inter service communication componentrestTemplate+ribbon,OpenfeignrestTemplate+ribbon,Openfeign
Service degradation and fusingsentinelhystrix hystrix dashboard
Service gateway componentgatewaygateway
Unified configuration center message bus componentnacosconfig bus

Actual development of microservice project springcloud netfilx + springcloud alibaba +springcloud spring

Five component selection

  • 1. Service registry = = = = > Nacos (Alibaba)
  • 2. Load balancing between service communications = = = = = = > resttemplate + ribbon (Netflix) or Openfeign (Spring)
  • 3. Service fusing and service degradation = = = = = > sentinel (Alibaba)
  • 4. Service gateway component = = = = > gateway (spring)
  • 5. Unified configuration center component = = = = > Nacos (Alibaba)

Build spring cloud Alibaba environment

1. Create a new empty project

Get information

2. Create a new module in an empty project

3. Add dependent

<!--inherit springboot Parent project-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
    </parent>
     <!--Jiaqun 1025684353 blowing water and chatting together-->

    <!--Define version number-->
    <properties>
        <spring.cloud.version>Hoxton.SR6</spring.cloud.version>
        <spring.cloud.alibaba.version>2.2.1.RELEASE</spring.cloud.alibaba.version>
    </properties>

    <!--Maintenance dependency-->
    <dependencyManagement>
        <dependencies>
        <!--maintain springcloud-->
         <!--Jiaqun 1025684353 blowing water and chatting together-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring.cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        <!--maintain springcloud alibaba-->
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>${spring.cloud.alibaba.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

Finally, I wish you success in your studies as soon as possible, get a satisfactory offer, get a quick promotion and raise, and reach the peak of your life. If you can, please give me a third company to support me. I'll see you next time

Get information

Keywords: Java Spring Distribution Spring Cloud springcloudalibaba

Added by adt2007 on Mon, 03 Jan 2022 01:50:01 +0200