<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Linh Truong Cong Hong</title>
    <description>The latest articles on DEV Community by Linh Truong Cong Hong (@linhtch90).</description>
    <link>https://dev.to/linhtch90</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446735%2F226c0655-6148-4a57-8d1b-91b1179ba28a.jpeg</url>
      <title>DEV Community: Linh Truong Cong Hong</title>
      <link>https://dev.to/linhtch90</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/linhtch90"/>
    <language>en</language>
    <item>
      <title>Build a microservices system with Java Spring Boot</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Sun, 06 Feb 2022 14:36:19 +0000</pubDate>
      <link>https://dev.to/linhtch90/build-a-microservices-system-with-java-spring-boot-2hn6</link>
      <guid>https://dev.to/linhtch90/build-a-microservices-system-with-java-spring-boot-2hn6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Github repo for this project: (Please give me a Github star ⭐ for this effort! Thank you!)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/linhtch90/microservices-java-demo-zoo-devto" rel="noopener noreferrer"&gt;https://github.com/linhtch90/microservices-java-demo-zoo-devto&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Microservice is the concept of decomposing a large monolith application into small, independent, distributed services. This could improve the flexibility, scalability and resiliency of the whole system.&lt;/p&gt;

&lt;p&gt;The introduction of Spring Cloud framework makes it easier for developers to build and deploy microservices to private and public clouds. This framework has wrapped a wide varieties of popular cloud-management microservices frameworks under a well-organized framework.&lt;/p&gt;

&lt;p&gt;In this blog post, I want to help you have an overview about Spring Cloud framework by building a simple microservices system with Spring Cloud step by step. This system includes the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration server&lt;/li&gt;
&lt;li&gt;Service discovery with Eureka&lt;/li&gt;
&lt;li&gt;2 demo microservices called Tiger and Panther&lt;/li&gt;
&lt;li&gt;Gateway server&lt;/li&gt;
&lt;li&gt;RabbitMQ for messaging between microservices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The relationships between those services are described as the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4181ec1w31ansqdukz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4181ec1w31ansqdukz6.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's begin building this system!&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration server
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooconfsvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Description: zoo microservices config server&lt;/li&gt;
&lt;li&gt;JDK: I am using JDK 17 for this tutorial. I have not tested this project with older JDKs yet!&lt;/li&gt;
&lt;li&gt;Dependencies: Config Server (So other services can get their configuration information from this service)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-config-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a folder called &lt;code&gt;config/&lt;/code&gt; and create 4 configuration files &lt;code&gt;eureka-server.properties&lt;/code&gt;, &lt;code&gt;gateway-server.properties&lt;/code&gt;, &lt;code&gt;panther-service.properties&lt;/code&gt;, &lt;code&gt;tiger-service.properties&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableConfigServer&lt;/code&gt; annotation to the main entrance class &lt;code&gt;MicroserviceZooConfigServerApplication.java&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service discovery (with Eureka)
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooeurekasvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Description: zoo microservices services discovery&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka server, config client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooServicesDiscoveryApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Gateway server
&lt;/h3&gt;

&lt;p&gt;Gateway server is the service that handles all request from client. Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zoogateway&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Description: microservice gateway for the zoo demo&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-gateway&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooGatewayApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tiger service
&lt;/h3&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.tigerservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-tiger&lt;/li&gt;
&lt;li&gt;Name: microservice-tiger&lt;/li&gt;
&lt;li&gt;Description: microservice tiger&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, open feign (also for load balancer), RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-openfeign&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.1.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableFeignClients&lt;/code&gt; annotation to &lt;code&gt;MicroserviceTigerApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.service&lt;/code&gt; package and add 2 files &lt;code&gt;ClientToPantherService.java&lt;/code&gt; for directly call Panther service and &lt;code&gt;RabitMQSender.java&lt;/code&gt; for sending a string message to Panther via RabbitMQ. &lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerController.java&lt;/code&gt;, specifying controllers for calling Panther service.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.component&lt;/code&gt; package and add &lt;code&gt;RabitMQSenderComponent.java&lt;/code&gt; for creating Beans related to messaging service.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Panther service
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.pantherservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-panther&lt;/li&gt;
&lt;li&gt;Name: microservice-panther&lt;/li&gt;
&lt;li&gt;Description: microservice panther&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create controller and other components for the services as follow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerCallPanther.java&lt;/code&gt; for directly respond to calls from Tiger service in the form of a string.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.component&lt;/code&gt; package and add 2 files &lt;code&gt;RabbitMQComponent.java&lt;/code&gt; and &lt;code&gt;RabbitMQReceiver.java&lt;/code&gt; for settings related to listening and responding to messages sent from Tiger service. Right after receiving the message from Tiger service, Panther service print the message into the Log.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RabbitMQ
&lt;/h2&gt;

&lt;p&gt;Please refer to &lt;a href="https://medium.com/m/global-identity?redirectUrl=https%3A%2F%2Fcodeburst.io%2Fget-started-with-rabbitmq-on-docker-4428d7f6e46b" rel="noopener noreferrer"&gt;this tutorial&lt;/a&gt; for using RabbitMQ with Docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the whole system
&lt;/h2&gt;

&lt;p&gt;Please follow this order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start RabbitMQ with Docker (see above section)&lt;/li&gt;
&lt;li&gt;Start Configuration server &lt;/li&gt;
&lt;li&gt;Start Discovery service &lt;/li&gt;
&lt;li&gt;Start Tiger service &lt;/li&gt;
&lt;li&gt;Start Panther service &lt;/li&gt;
&lt;li&gt;Start Gateway server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing microservices with Postman
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Direct call from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/callpantherservice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response from Panther service is a string with content.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PANTHER RECEIVED CALL FROM TIGER&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send message from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/sendmessagetopanther
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is not any response in Postman. It is okay. Please go to the terminal screen where you are running Panther service. You will see a log message saying:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Received message is: Message from Tiger to Panther via RabbitMQ&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And that is all everybody!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you feel this project is useful for you, please give my project a Github star ⭐ as an encouragement!&lt;/p&gt;

&lt;p&gt;Thank you so much!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Microservices with Java Spring Boot</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Sat, 05 Feb 2022 15:04:06 +0000</pubDate>
      <link>https://dev.to/linhtch90/microservices-with-java-spring-boot-5bpj</link>
      <guid>https://dev.to/linhtch90/microservices-with-java-spring-boot-5bpj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Github repo for this project:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/linhtch90/microservices-java-demo-zoo-devto"&gt;https://github.com/linhtch90/microservices-java-demo-zoo-devto&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Microservice is the concept of decomposing a large monolith application into small, independent, distributed services. This could improve the flexibility, scalability and resiliency of the whole system.&lt;/p&gt;

&lt;p&gt;The introduction of Spring Cloud framework makes it easier for developers to build and deploy microservices to private and public clouds. This framework has wrapped a wide varieties of popular cloud-management microservices frameworks under a well-organized framework.&lt;/p&gt;

&lt;p&gt;In this blog post, I want to help you have an overview about Spring Cloud framework by building a simple microservices system with Spring Cloud step by step. This system includes the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration server&lt;/li&gt;
&lt;li&gt;Service discovery with Eureka&lt;/li&gt;
&lt;li&gt;2 demo microservices called Tiger and Panther&lt;/li&gt;
&lt;li&gt;Gateway server&lt;/li&gt;
&lt;li&gt;RabbitMQ for messaging between microservices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The relationships between those services are described as the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bQim7yHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gd1rwndwlcetzxs1nsz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bQim7yHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gd1rwndwlcetzxs1nsz.png" alt="Image description" width="561" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's begin building this system!&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration server
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooconfsvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Description: zoo microservices config server&lt;/li&gt;
&lt;li&gt;JDK: I am using JDK 17 for this tutorial. I have not tested this project with older JDKs yet!&lt;/li&gt;
&lt;li&gt;Dependencies: Config Server (So other services can get their configuration information from this service)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-config-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a folder called &lt;code&gt;config/&lt;/code&gt; and create 4 configuration files &lt;code&gt;eureka-server.properties&lt;/code&gt;, &lt;code&gt;gateway-server.properties&lt;/code&gt;, &lt;code&gt;panther-service.properties&lt;/code&gt;, &lt;code&gt;tiger-service.properties&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableConfigServer&lt;/code&gt; annotation to the main entrance class &lt;code&gt;MicroserviceZooConfigServerApplication.java&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service discovery (with Eureka)
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooeurekasvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Description: zoo microservices services discovery&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka server, config client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooServicesDiscoveryApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Gateway server
&lt;/h3&gt;

&lt;p&gt;Gateway server is the service that handles all request from client. Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zoogateway&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Description: microservice gateway for the zoo demo&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-gateway&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooGatewayApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tiger service
&lt;/h3&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.tigerservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-tiger&lt;/li&gt;
&lt;li&gt;Name: microservice-tiger&lt;/li&gt;
&lt;li&gt;Description: microservice tiger&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, open feign (also for load balancer), RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-openfeign&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.1.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableFeignClients&lt;/code&gt; annotation to &lt;code&gt;MicroserviceTigerApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.service&lt;/code&gt; package and add 2 files &lt;code&gt;ClientToPantherService.java&lt;/code&gt; for directly call Panther service and &lt;code&gt;RabitMQSender.java&lt;/code&gt; for sending a string message to Panther via RabbitMQ. &lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerController.java&lt;/code&gt;, specifying controllers for calling Panther service.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.component&lt;/code&gt; package and add &lt;code&gt;RabitMQSenderComponent.java&lt;/code&gt; for creating Beans related to messaging service.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Panther service
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.pantherservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-panther&lt;/li&gt;
&lt;li&gt;Name: microservice-panther&lt;/li&gt;
&lt;li&gt;Description: microservice panther&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create controller and other components for the services as follow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerCallPanther.java&lt;/code&gt; for directly respond to calls from Tiger service in the form of a string.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.component&lt;/code&gt; package and add 2 files &lt;code&gt;RabbitMQComponent.java&lt;/code&gt; and &lt;code&gt;RabbitMQReceiver.java&lt;/code&gt; for settings related to listening and responding to messages sent from Tiger service. Right after receiving the message from Tiger service, Panther service print the message into the Log.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RabbitMQ
&lt;/h2&gt;

&lt;p&gt;Please refer to &lt;a href="https://medium.com/m/global-identity?redirectUrl=https%3A%2F%2Fcodeburst.io%2Fget-started-with-rabbitmq-on-docker-4428d7f6e46b"&gt;this tutorial&lt;/a&gt; for using RabbitMQ with Docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the whole system
&lt;/h2&gt;

&lt;p&gt;Please follow this order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start RabbitMQ with Docker (see above section)&lt;/li&gt;
&lt;li&gt;Start Configuration server &lt;/li&gt;
&lt;li&gt;Start Discovery service &lt;/li&gt;
&lt;li&gt;Start Tiger service &lt;/li&gt;
&lt;li&gt;Start Panther service &lt;/li&gt;
&lt;li&gt;Start Gateway server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing microservices with Postman
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Direct call from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/callpantherservice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result should look like the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3IFE0-V1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8ptdl71bwqbyatcfrem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3IFE0-V1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8ptdl71bwqbyatcfrem.png" alt="Image description" width="880" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send message from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/sendmessagetopanther
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is not any response in Postman. It is okay. Please go to the terminal screen where you are running Panther service. You will see a log message saying:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Received message is: Message from Tiger to Panther via RabbitMQ&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And that is all everybody!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you feel this project is useful for you, please give my project a Github star ⭐ as an encouragement!&lt;/p&gt;

&lt;p&gt;Thank you so much!&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>distributedsystems</category>
    </item>
    <item>
      <title>Build a microservices system with Java</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Sat, 05 Feb 2022 11:47:12 +0000</pubDate>
      <link>https://dev.to/linhtch90/build-a-microservices-system-with-java-2noh</link>
      <guid>https://dev.to/linhtch90/build-a-microservices-system-with-java-2noh</guid>
      <description>&lt;p&gt;&lt;strong&gt;Github repo for this project: (Please give me a Github star ⭐ for this effort! Thank you!)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/linhtch90/microservices-java-demo-zoo-devto"&gt;https://github.com/linhtch90/microservices-java-demo-zoo-devto&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Microservice is the concept of decomposing a large monolith application into small, independent, distributed services. This could improve the flexibility, scalability and resiliency of the whole system.&lt;/p&gt;

&lt;p&gt;The introduction of Spring Cloud framework makes it easier for developers to build and deploy microservices to private and public clouds. This framework has wrapped a wide varieties of popular cloud-management microservices frameworks under a well-organized framework.&lt;/p&gt;

&lt;p&gt;In this blog post, I want to help you have an overview about Spring Cloud framework by building a simple microservices system with Spring Cloud step by step. This system includes the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration server&lt;/li&gt;
&lt;li&gt;Service discovery with Eureka&lt;/li&gt;
&lt;li&gt;2 demo microservices called Tiger and Panther&lt;/li&gt;
&lt;li&gt;Gateway server&lt;/li&gt;
&lt;li&gt;RabbitMQ for messaging between microservices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The relationships between those services are described as the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---N5S-wCT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtj39d2b1x7gnhuvr6op.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---N5S-wCT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtj39d2b1x7gnhuvr6op.png" alt="Image description" width="561" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's begin building this system!&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration server
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooconfsvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-config-server&lt;/li&gt;
&lt;li&gt;Description: zoo microservices config server&lt;/li&gt;
&lt;li&gt;JDK: I am using JDK 17 for this tutorial. I have not tested this project with older JDKs yet!&lt;/li&gt;
&lt;li&gt;Dependencies: Config Server (So other services can get their configuration information from this service)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-config-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a folder called &lt;code&gt;config/&lt;/code&gt; and create 4 configuration files &lt;code&gt;eureka-server.properties&lt;/code&gt;, &lt;code&gt;gateway-server.properties&lt;/code&gt;, &lt;code&gt;panther-service.properties&lt;/code&gt;, &lt;code&gt;tiger-service.properties&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableConfigServer&lt;/code&gt; annotation to the main entrance class &lt;code&gt;MicroserviceZooConfigServerApplication.java&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service discovery (with Eureka)
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zooeurekasvr&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-services-discovery&lt;/li&gt;
&lt;li&gt;Description: zoo microservices services discovery&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka server, config client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-server&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooServicesDiscoveryApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Gateway server
&lt;/h3&gt;

&lt;p&gt;Gateway server is the service that handles all request from client. Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.zoogateway&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Name: microservice-zoo-gateway&lt;/li&gt;
&lt;li&gt;Description: microservice gateway for the zoo demo&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;java.version&amp;gt;&lt;/span&gt;17&lt;span class="nt"&gt;&amp;lt;/java.version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;spring-cloud.version&amp;gt;&lt;/span&gt;2021.0.0&lt;span class="nt"&gt;&amp;lt;/spring-cloud.version&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-gateway&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableEurekaServer&lt;/code&gt; annotation to &lt;code&gt;MicroserviceZooGatewayApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tiger service
&lt;/h3&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.tigerservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-tiger&lt;/li&gt;
&lt;li&gt;Name: microservice-tiger&lt;/li&gt;
&lt;li&gt;Description: microservice tiger&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, open feign (also for load balancer), RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-openfeign&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.1.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add &lt;code&gt;@EnableFeignClients&lt;/code&gt; annotation to &lt;code&gt;MicroserviceTigerApplication.java&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.service&lt;/code&gt; package and add 2 files &lt;code&gt;ClientToPantherService.java&lt;/code&gt; for directly call Panther service and &lt;code&gt;RabitMQSender.java&lt;/code&gt; for sending a string message to Panther via RabbitMQ. &lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerController.java&lt;/code&gt;, specifying controllers for calling Panther service.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.tigerservice.component&lt;/code&gt; package and add &lt;code&gt;RabitMQSenderComponent.java&lt;/code&gt; for creating Beans related to messaging service.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Panther service
&lt;/h2&gt;

&lt;p&gt;Go to &lt;code&gt;start.spring.io&lt;/code&gt; and generate a new project with the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group ID: com.microservices.pantherservice&lt;/li&gt;
&lt;li&gt;Artifact ID: microservice-panther&lt;/li&gt;
&lt;li&gt;Name: microservice-panther&lt;/li&gt;
&lt;li&gt;Description: microservice panther&lt;/li&gt;
&lt;li&gt;Dependencies: Eureka client, config client, web, client load balancer, RabbitMQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your &lt;code&gt;pom.xml&lt;/code&gt; should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-bootstrap&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-loadbalancer&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-netflix-eureka-client&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-starter-config&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-amqp&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;test&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.cloud&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-cloud-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${spring-cloud.version}&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In folder &lt;code&gt;src/main/resources/&lt;/code&gt;, add a file called &lt;code&gt;bootstrap.properties&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;The content of those &lt;code&gt;.properties&lt;/code&gt; files could be found in my Github repo (I put the link on top of this blog post)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create controller and other components for the services as follow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.controller&lt;/code&gt; package and add &lt;code&gt;TigerCallPanther.java&lt;/code&gt; for directly respond to calls from Tiger service in the form of a string.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;com.microservices.pantherservice.component&lt;/code&gt; package and add 2 files &lt;code&gt;RabbitMQComponent.java&lt;/code&gt; and &lt;code&gt;RabbitMQReceiver.java&lt;/code&gt; for settings related to listening and responding to messages sent from Tiger service. Right after receiving the message from Tiger service, Panther service print the message into the Log.&lt;/li&gt;
&lt;li&gt;Please refer to my Github repo for the content of these files. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RabbitMQ
&lt;/h2&gt;

&lt;p&gt;Please refer to &lt;a href="https://medium.com/m/global-identity?redirectUrl=https%3A%2F%2Fcodeburst.io%2Fget-started-with-rabbitmq-on-docker-4428d7f6e46b"&gt;this tutorial&lt;/a&gt; for using RabbitMQ with Docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the whole system
&lt;/h2&gt;

&lt;p&gt;Please follow this order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start RabbitMQ with Docker (see above section)&lt;/li&gt;
&lt;li&gt;Start Configuration server &lt;/li&gt;
&lt;li&gt;Start Discovery service &lt;/li&gt;
&lt;li&gt;Start Tiger service &lt;/li&gt;
&lt;li&gt;Start Panther service &lt;/li&gt;
&lt;li&gt;Start Gateway server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing microservices with Postman
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Direct call from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/callpantherservice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result should look like the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SHslcMQE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/daoh9nwggg4x9420aisd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SHslcMQE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/daoh9nwggg4x9420aisd.png" alt="Image description" width="880" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send message from Tiger service to Panther service: Open Postman and send a request to
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8074/tiger-service/tiger/sendmessagetopanther
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is not any response in Postman. It is okay. Please go to the terminal screen where you are running Panther service. You will see a log message saying:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Received message is: Message from Tiger to Panther via RabbitMQ&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And that is all everybody!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you feel this project is useful for you, please give my project a Github star ⭐ as an encouragement!&lt;/p&gt;

&lt;p&gt;Thank you so much!&lt;/p&gt;

</description>
      <category>java</category>
      <category>microservices</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to get start understanding source code of open source projects?</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Sat, 29 Jan 2022 09:33:57 +0000</pubDate>
      <link>https://dev.to/linhtch90/how-to-get-start-understanding-source-code-of-open-source-projects-8om</link>
      <guid>https://dev.to/linhtch90/how-to-get-start-understanding-source-code-of-open-source-projects-8om</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Open source software is awesome and important for the industry. However, whenever I try to read some code for an open source project with the intent to contribute, I get scared. I get this weird anxiety and for some reason my brain freezes. I can't understand anything what the code is doing and how it's working, it looks too complicated even if I kinda understand what things are supposed to do.&lt;/p&gt;

&lt;p&gt;I can't describe the feeling. Even if I know the language and I've learned a lot.&lt;/p&gt;

&lt;p&gt;How do I start?&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>contributorswanted</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Clone Twitter functions with ReactJS</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Wed, 26 Jan 2022 08:38:04 +0000</pubDate>
      <link>https://dev.to/linhtch90/clone-twitter-functions-with-reactjs-h64</link>
      <guid>https://dev.to/linhtch90/clone-twitter-functions-with-reactjs-h64</guid>
      <description>&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height) User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For source code and demo, please visit my Github repo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please give me a ⭐ Github star ⭐ for my effort if you think this project is useful for you!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Develop a Twitter clone with ReactJS</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Fri, 21 Jan 2022 17:17:25 +0000</pubDate>
      <link>https://dev.to/linhtch90/develop-a-twitter-clone-with-reactjs-50dh</link>
      <guid>https://dev.to/linhtch90/develop-a-twitter-clone-with-reactjs-50dh</guid>
      <description>&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height) User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please give me a ⭐ Github star ⭐ for my effort if you think this project is useful for you!&lt;/p&gt;

&lt;p&gt;Live Demo and Source Code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Develope a twitter clone with ReactJS</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Tue, 18 Jan 2022 05:03:14 +0000</pubDate>
      <link>https://dev.to/linhtch90/develope-a-twitter-clone-with-reactjs-2gh5</link>
      <guid>https://dev.to/linhtch90/develope-a-twitter-clone-with-reactjs-2gh5</guid>
      <description>&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height) User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope you enjoy it and give me a ⭐ Github star ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Demo and Source Code:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>node</category>
    </item>
    <item>
      <title>Code a social network with ReactJS</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Mon, 17 Jan 2022 08:55:12 +0000</pubDate>
      <link>https://dev.to/linhtch90/code-a-social-network-with-reactjs-2936</link>
      <guid>https://dev.to/linhtch90/code-a-social-network-with-reactjs-2936</guid>
      <description>&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--emH6jDZB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhtck1mho63dkhp3a54u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--emH6jDZB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhtck1mho63dkhp3a54u.png" alt="Image description" width="880" height="1265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height) User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope you enjoy it and give me a ⭐ Github star ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;Live Demo:&lt;br&gt;
&lt;a href="https://psn-social-network.herokuapp.com/#/"&gt;https://psn-social-network.herokuapp.com/#/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source Code:&lt;br&gt;
&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Build a social network app with ReactJS, Spring Boot and MongoDB</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Fri, 14 Jan 2022 02:07:30 +0000</pubDate>
      <link>https://dev.to/linhtch90/build-a-social-network-app-with-reactjs-spring-boot-and-mongodb-31p9</link>
      <guid>https://dev.to/linhtch90/build-a-social-network-app-with-reactjs-spring-boot-and-mongodb-31p9</guid>
      <description>&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height)&lt;/li&gt;
&lt;li&gt;User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this project is useful for you , please give me a Github star ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;Source Code:&lt;br&gt;
&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Live Demo:&lt;br&gt;
&lt;a href="https://psn-social-network.herokuapp.com/#/"&gt;https://psn-social-network.herokuapp.com/#/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>java</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to build a social network app with ReactJS</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Thu, 13 Jan 2022 07:51:38 +0000</pubDate>
      <link>https://dev.to/linhtch90/how-to-build-a-social-network-app-with-reactjs-34d3</link>
      <guid>https://dev.to/linhtch90/how-to-build-a-social-network-app-with-reactjs-34d3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fiEBHOZI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e3cisbw1uoop1p1dd2j3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fiEBHOZI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e3cisbw1uoop1p1dd2j3.png" alt="Image description" width="880" height="1265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height)&lt;/li&gt;
&lt;li&gt;User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this project is useful for you , please give me a ⭐ Github star ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;Source Code:&lt;br&gt;
&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Develop a social network with ReactJS, Spring Boot and MongoDB</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Tue, 11 Jan 2022 02:31:53 +0000</pubDate>
      <link>https://dev.to/linhtch90/develop-a-social-network-with-reactjs-spring-boot-and-mongodb-24l8</link>
      <guid>https://dev.to/linhtch90/develop-a-social-network-with-reactjs-spring-boot-and-mongodb-24l8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K_w9vPAg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pid63yxzxjnyypgsi3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K_w9vPAg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pid63yxzxjnyypgsi3r.png" alt="Image description" width="880" height="1265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height) &lt;/li&gt;
&lt;li&gt;User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope you enjoy it and if this project is useful for you , please give me a ⭐ &lt;strong&gt;Github star&lt;/strong&gt; ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;Source Code:&lt;br&gt;
&lt;a href="https://github.com/linhtch90/psn-social-network-public-source"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Live Demo:&lt;br&gt;
&lt;a href="https://psn-social-network.herokuapp.com/#/"&gt;https://psn-social-network.herokuapp.com/#/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>Example social network developed with ReactJS, Spring Boot and MongoDB</title>
      <dc:creator>Linh Truong Cong Hong</dc:creator>
      <pubDate>Sun, 09 Jan 2022 16:02:56 +0000</pubDate>
      <link>https://dev.to/linhtch90/example-social-network-developed-with-reactjs-spring-boot-and-mongodb-pgk</link>
      <guid>https://dev.to/linhtch90/example-social-network-developed-with-reactjs-spring-boot-and-mongodb-pgk</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2jdkqv5z3ik0daganr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2jdkqv5z3ik0daganr8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have developed a small social network web app for educational purpose and want to share this with the community. This app is built with ReactJS for frontend, Java Spring Boot for backend and MongoDB as the database.&lt;/p&gt;

&lt;p&gt;The app tries to mimic a few functions of Twitter, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create post with text and image&lt;/li&gt;
&lt;li&gt;The number of characters in each post is limited to 200 characters&lt;/li&gt;
&lt;li&gt;Like, comment and re-post a post&lt;/li&gt;
&lt;li&gt;View the number of likes, comments and shares of a post&lt;/li&gt;
&lt;li&gt;Comments are toggle&lt;/li&gt;
&lt;li&gt;The number of character in each comment is limited to 100 characters&lt;/li&gt;
&lt;li&gt;Follow, un-follow someone&lt;/li&gt;
&lt;li&gt;See who are following us and follow them back&lt;/li&gt;
&lt;li&gt;Check who we are following&lt;/li&gt;
&lt;li&gt;View all posts of an individual&lt;/li&gt;
&lt;li&gt;View our own posts&lt;/li&gt;
&lt;li&gt;&lt;p&gt;List all user accounts in the entire social network (due to the number of users are still small, I did not develop search user function)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Other functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Due to limited storage space, client app compresses the uploaded image to the maximum of 250px (width or height)
User avatar is created by hashing user id and convert that hash code into a hexagonal image&lt;/li&gt;
&lt;li&gt;Authentication and authorization use JWT&lt;/li&gt;
&lt;li&gt;Responsive frontend for desktop and mobile devices&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Technical stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: ReactJS, Redux Toolkit, React Router, React Bootstrap&lt;/li&gt;
&lt;li&gt;Backend: Java Spring Boot&lt;/li&gt;
&lt;li&gt;Database: MongoDB&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Hope you enjoy it and if this project is useful for you , please give me a ⭐ Github star ⭐ for my effort!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Demo:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://psn-social-network.herokuapp.com/#/" rel="noopener noreferrer"&gt;https://psn-social-network.herokuapp.com/#/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source Code:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/linhtch90/psn-social-network-public-source" rel="noopener noreferrer"&gt;https://github.com/linhtch90/psn-social-network-public-source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
