{"id":19827199,"url":"https://github.com/sandysanthosh/spring-boot-microservices","last_synced_at":"2025-05-01T14:32:14.955Z","repository":{"id":107709146,"uuid":"162167361","full_name":"sandysanthosh/SPRING-BOOT-MICROSERVICES","owner":"sandysanthosh","description":"Spring Boot quick reference guide for Developers.","archived":false,"fork":false,"pushed_at":"2024-09-16T17:58:10.000Z","size":11055,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-16T22:07:36.240Z","etag":null,"topics":["12factorapp","annotations","framework","guidelines","java","microservice","spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://sandysanthosh.github.io/SPRING-BOOT-MICROSERVICES/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandysanthosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/KarthikeyanR71","starwalt.in"]}},"created_at":"2018-12-17T17:34:10.000Z","updated_at":"2024-09-16T17:58:13.000Z","dependencies_parsed_at":"2023-05-05T00:33:03.274Z","dependency_job_id":null,"html_url":"https://github.com/sandysanthosh/SPRING-BOOT-MICROSERVICES","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandysanthosh%2FSPRING-BOOT-MICROSERVICES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandysanthosh%2FSPRING-BOOT-MICROSERVICES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandysanthosh%2FSPRING-BOOT-MICROSERVICES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandysanthosh%2FSPRING-BOOT-MICROSERVICES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandysanthosh","download_url":"https://codeload.github.com/sandysanthosh/SPRING-BOOT-MICROSERVICES/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224261993,"owners_count":17282267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["12factorapp","annotations","framework","guidelines","java","microservice","spring","spring-boot"],"created_at":"2024-11-12T11:12:42.826Z","updated_at":"2024-11-12T11:12:43.941Z","avatar_url":"https://github.com/sandysanthosh.png","language":"Java","funding_links":["https://paypal.me/KarthikeyanR71","starwalt.in"],"categories":[],"sub_categories":[],"readme":"# SpringBoot:\n\n* Spring Boot is a project that is built on the top of the Spring Framework. \n\n* It provides an easier and faster way to set up, configure, and run both simple and web-based applications.\n\n### Why should we use Spring Boot Framework?\n\nWe should use Spring Boot Framework because:\n\n* The dependency injection approach is used in Spring Boot.\n\n* It contains powerful database transaction management capabilities.\n\n* It simplifies integration with other Java frameworks like JPA/Hibernate ORM, Struts, etc.\n\n* It reduces the cost and development time of the application.\n\n* Along with the Spring Boot Framework, many other Spring sister projects help to build applications addressing modern business needs.\n\n####  There are the following Spring sister projects are as follows:\n\n* Spring Data: It simplifies data access from the relational and NoSQL databases.\n\n* Spring Batch: It provides powerful batch processing.\n\n* Spring Security: It is a security framework that provides robust security to applications.\n\n* Spring Social: It supports integration with social networking like LinkedIn.\n\n* Spring Integration: It is an implementation of Enterprise Integration Patterns.\n\nIt facilitates integration with other enterprise applications using lightweight messaging and declarative adapters.\n\n#### Advantages of Spring Boot:\n\n* It creates stand-alone Spring applications that can be started using Java -jar.\n\n* It tests web applications easily with the help of different Embedded HTTP servers such as Tomcat, Jetty, etc. We don't need to deploy WAR files.\n\n* It provides opinionated 'starter' POMs to simplify our Maven configuration.\n\n* It provides production-ready features such as metrics, health checks, and externalized configuration.\n\n* There is no requirement for XML configuration.\n\n* It offers a CLI tool for developing and testing the Spring Boot application.\n\n* It offers the number of plug-ins.\n\n* It also minimizes writing multiple boilerplate codes (the code that has to be included in many places with little or no alteration), XML configuration, and annotations.\n\n* It increases productivity and reduces development time.\n\n\n#### Limitations of Spring Boot:\n\n\nSpring Boot can use dependencies that are not going to be used in the application. These dependencies increase the size of the application.\n\n#### Spring Boot Features:\n\n* Web Development\n\n* SpringApplication\n\n* Application events and listeners\n\n* Admin features\n\n* Externalized Configuration\n\n* Properties Files\n\n* YAML Support\n\n* Type-safe Configuration\n\n* Logging\n\n* Security\n\n### SPRING-BOOT-MICROSERVICES Annotations:\n\n\n#### No beans.xml\n\n* **@Required:** It applies to the bean setter method. It indicates that the annotated bean must be populated at configuration time with the required property, else it throws an exception BeanInitilizationException.\n\n* **@Autowired:** Spring provides annotation-based auto-wiring by providing @Autowired annotation. It is used to autowire spring bean on setter methods, instance variable, and constructor. When we use @Autowired annotation, the spring container auto-wires the bean by matching data-type.\n\n* **@Configuration:** It is a class-level annotation. The class annotated with @Configuration used by Spring Containers as a source of bean definitions.\n\n* **@ComponentScan:** It is used when we want to scan a package for beans. It is used with the annotation @Configuration. We can also specify the base packages to scan for Spring Components.\n\n* **@Bean:** It is a method-level annotation. It is an alternative of XML \u003cbean\u003e tag. It tells the method to produce a bean to be managed by Spring Container.\n\n* **@Component:** It is a class-level annotation. It is used to mark a Java class as a bean. A Java class annotated with @Component is found during the classpath. The Spring Framework pick it up and configure it in the application context as a Spring Bean.\n\n* **@Controller:** The @Controller is a class-level annotation. It is a specialization of @Component. It marks a class as a web request handler. It is often used to serve web pages. By default, it returns a string that indicates which route to redirect. It is mostly used with @RequestMapping annotation.\n\n*  **@Service:** It is also used at class level. It tells the Spring that class contains the business logic.\n\n*  **@Repository:** It is a class-level annotation. The repository is a DAOs (Data Access Object) that access the database directly. The repository does all the operations related to the database.\n\n* **@SpringBootApplication:** It is a combination of three annotations @EnableAutoConfiguration, @ComponentScan, and @Configuration.\n\n### Spring MVC and REST Annotations:\n\n*  **@RequestMapping:** It is used to map the web requests. It has many optional elements like consumes, header, method, name, params, path, produces, and value. We use it with the class as well as the method.\n\n* **@GetMapping:** It maps the HTTP GET requests on the specific handler method. It is used to create a web service endpoint that fetches It is used instead of using: @RequestMapping(method = RequestMethod.GET)\n\n* **@PostMapping:** It maps the HTTP POST requests on the specific handler method. It is used to create a web service endpoint that creates It is used instead of using: @RequestMapping(method = RequestMethod.POST)\n\n* **@PutMapping**: It maps the HTTP PUT requests on the specific handler method. It is used to create a web service endpoint that creates or updates It is used instead of using: @RequestMapping(method = RequestMethod.PUT)\n\n* **@DeleteMapping:** It maps the HTTP DELETE requests on the specific handler method. It is used to create a web service endpoint that deletes a resource. It is used instead of using: @RequestMapping(method = RequestMethod.DELETE)\n\n* **@PatchMapping:** It maps the HTTP PATCH requests on the specific handler method. It is used instead of using: @RequestMapping(method = RequestMethod.PATCH)\n\n* **@RequestBody:** It is used to bind HTTP request with an object in a method parameter. Internally it uses HTTP MessageConverters to convert the body of the request. When we annotate a method parameter with @RequestBody, the Spring framework binds the incoming HTTP request body to that parameter.\n\n* **@ResponseBody:** It binds the method return value to the response body. It tells the Spring Boot Framework to serialize a return an object into JSON and XML format.\n\n* **@PathVariable:** It is used to extract the values from the URI. It is most suitable for the RESTful web service, where the URL contains a path variable. We can define multiple @PathVariable in a method.\n\n* **@RequestParam:** It is used to extract the query parameters form the URL. It is also known as a query parameter. It is most suitable for web applications. It can specify default values if the query parameter is not present in the URL.\n\n* **@RequestHeader:** It is used to get the details about the HTTP request headers. We use this annotation as a method parameter. The optional elements of the annotation are name, required, value, defaultValue. For each detail in the header, we should specify separate annotations. We can use it multiple time in a method\n\n* **@RestController:** It can be considered as a combination of @Controller and @ResponseBody annotations. The @RestController annotation is itself annotated with the @ResponseBody annotation. It eliminates the need for annotating each method with @ResponseBody.\n\n* **@RequestAttribute:** It binds a method parameter to request attribute. It provides convenient access to the request attributes from a controller method. With the help of @RequestAttribute annotation, we can access objects that are populated on the server-side.\n\n* **@EnableSwagger2:** Mainly used for documentation the Restful we-service \n\n* **@EnableOAuth2Sso:** Oauth Authentication \n\n# Boot-starter-logging:\n\n* internal Logger -\u003e Apache Commons Logging \n\n* private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());\n\n* spring.output.ansi.enabled - always, detect or never \t\n\n*  LOGGER.info(\"Simple log statement with inputs {}, {} and {}\", 1,2,3);\n\n*  Types -\u003e logging, log4j, logback\n\n\t```\n  \tLOGGER.debug(\"This is a debug message\");\n \n\tLOGGER.info(\"This is an info message\");\n  \n\tLOGGER.warn(\"This is a warn message\");\n  \n\tLOGGER.error(\"This is an error message\");\n\t```\n\n# REST request validation annotations:\n\n\t@AssertFalse -\u003e The annotated element must be false.\n\n\t@AssertTrue -\u003e \tThe annotated element must be true.\n\n\t@DecimalMax -\u003e \tThe annotated element must be a number whose value must be lower or equal to the specified maximum.\n\n\t@DecimalMin -\u003e \tThe annotated element must be a number whose value must be higher or equal to the specified minimum.\n\n\t@Future -\u003e \tThe annotated element must be an instant, date or time in the future.\n\n\t@Max -\u003e \tThe annotated element must be a number whose value must be lower or equal to the specified maximum.\n\n\t@Min -\u003e \tThe annotated element must be a number whose value must be higher or equal to the specified minimum.\n\n\t@Negative -\u003e \tThe annotated element must be a strictly negative number.\n\n\t@NotBlank -\u003e \tThe annotated element must not be null and must contain at least one non-whitespace character.\n\n\t@NotEmpty -\u003e \tThe annotated element must not be null nor empty.\n\n\t@NotNull -\u003e \tThe annotated element must not be null.\n\n\t@Null -\u003e \tThe annotated element must be null.\n\n\t@Pattern -\u003e \tThe annotated CharSequence must match the specified regular expression.\n\n\t@Positive -\u003e \tThe annotated element must be a strictly positive number.\n\n\t@Size -\u003e \tThe annotated element size must be between the specified boundaries (included).\n\n\t\n\n#### AOP annotation:\n\n\t\n\t*   @Before: declares the before advice. It is applied before calling the actual method.\n        *   @After: declares the after advice. It is applied after calling the actual method and before returning result.\n        *   @AfterReturning: declares the after returning advice. It is applied after calling the actual method and before returning result.\n        *   @Around: declares the around advice. It is applied before and after calling the actual method.\n        *   @AfterThrowing: declares the throws advice. It is applied if actual method throws exception.\n\n#### Junit Test annotation:\n\n\t\t* @BeforeClass \n\t\t* @Before\n\t\t* @Test\n\t\t* @After\n\t\t* @AfterClass\n\t\t\n#### Various Assest Statement:\n\n```\nVoid  equals(boolean exptation, boolean Actual)\nVoid  Notequals(boolean exptation, boolean Actual)\nVoid  assertTrue(boolean condition)\nVoid  assertFalse(boolean condition)\nVoid  assertNull(Object object)\nVoid  assertNotNull(Object object)\nVoid  assertSame(Object object1,Object object 2)\nVoid  assertNotSame(Object object1,Object object 2)\t\nvoid assertArrayEquals(expectedArray, resultArray);\n\n```\n\n#### Lombok\n\n\t*Project Lombok is a Java library tool that generates code for minimizing boilerplate code.\n\t\n\t*The library replaces boilerplate code with easy-to-use annotations.\n\t\n\t* Will add all getter and setters \n\t\n\t* To string\n\t\n\t* Equal and barcode\n\t\n#### Spring Boot with Lombok post. In this part I’ll discuss the following Lombok constructs:\n\t\n\t```\n\t\n\tvar and val\n\t@Getter, @Setter\n\t@NoArgsConstructor, @AllArgsConstructor\n\t@Data\n\t@NotNull\n\t\n\t```\n\n\t\n#### Web App:\n\n\t* request\n\t* response\n\t* get\n\t* post\n\t* jsp\n\t* jstl\n\t* bootstrap\n\n#### Spring mvc:\n\n\t* dispatcher servlet\n\t* view resolver\n\t* model \n\t* view\n\t* validation \n\t* form tags\n\n#### Spring Boot:\n\n\t* starterss\n\t* Autoconfiguration\n\t* Initializr\n\t* actuator\n \t* embedded servers\n\n#### External config:\n\n#### MSA:\n\n* Collection of small autonomous \n* Small multiple services \n* All component seperate module\n* Stateless communication\n\n#### Advantage:\n\n* easy to maintain\n* Continuous Delivery \n* Hybrid Technology -java csharp mysql\n* Cross Team coordination\n* Higher Quality code\n* Smarter Scaling\n* Risk Reduction -Seperation of services allowed for localized changes\n* Promote Big Data Best Practises\n* Improved ROI with Reduced TCO\n\n\n## Microservices:\n\n* Client Side load balancer - Ribbon\n\n* Distributed Tracking - Sluth and Zipkin\n\n* Fault Tolerance using Hystrix\n\n* Feign Client\n\n* Router and ZUUL\n\n* Service Registry using Eureka\n\n* Spring Cloud BUS\n\n* Spring Cloud Config \n\n### 12FactorAPP-Microservices\n\n* Codebase  =  One codebase tracked in revision control, many deploys - SVN\n\n* Dependencies  = Explicitly declare and isolate dependencies - pom.xml\n\n* Config   = Store config in the environment   - DEV ,FET , ACC\n\n* Backing services = Treat backing services as attached resources\n\n* Build, release, run  = Strictly separate build and run stages\n\n* Processes  = Execute the app as one or more stateless processes\n\n* Port binding =  Export services via port binding\n\n* Concurrency = Scale out via the process model\n\n* Disposability = Maximize robustness with fast startup and graceful shutdown\n\n* Dev/prod parity = Keep development, staging, and production as similar as possibe\n\n* Logs = Treat logs as event streams\n\n* Admin processes = Run admin/management tasks as one-off processes\n\n\n#### Properties in Spring Boot:\n\t\nThe application.properties file allows us to run an application in a different environment. In short, we can use the application.properties file to:\n\t\n```\n* Configure the Spring Boot framework\n\t\n* define our application custom configuration properties\n\t\n```\n#### Spring Boot Property Categories:\n\t\nThere are sixteen categories of Spring Boot Property are as follows:\n\t\n```\nCore Properties\nCache Properties\nMail Properties\nJSON Properties\nData Properties\nTransaction Properties\nData Migration Properties\nIntegration Properties\nWeb Properties\nTemplating Properties\nServer Properties\nSecurity Properties\nRSocket Properties\nActuator Properties\nDevTools Properties\nTesting Properties\n```\n\t\n```\n#MYSQL DB Properties\nspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\nspring.datasource.url=jdbc:mysql://localhost:3306/dbname\nspring.datasource.username=root\nspring.datasource.password=root\n\n#JPA Properties\nspring.jpa.hibernate.ddl-auto=update\nspring.jpa.generate-ddl=true\nspring.jpa.show-sql=true\nspring.jpa.properties.hibernate.format_sql=true\n\n#Eureka Properties\neureka.client.register-with-eureka=true\neureka.client.fetch-registry=true\neureak.instance.hostnam=localhost\nmanagement.endpoints.web.exposure.include=*\neureka.client.serviceUrl.defaultZone = http://localhost:8761/eureka\n\nspring.cloud.config.uri=http://localhost:8888\n\nspring.rabbitmq.addresses=amqps://ailhzrhf:pnHKsJmZxwUZwUh_P7wEBiiD37BrfCnQ@finch.rmq.cloudamqp.com/ailhzrhf\n\nServer:\n    Jetty\n    Spring jpa mysql security \n    \n\nsecurity:\n  oauth2:\n    client:\n       clientId: a48f56f893775afb1912\n       clientSecret: c91036f105c04d0666655f411f716c43b606d373\n       accessTokenUri: https://github.com/login/oauth/access_token\n       userAuthorizationUri: https://github.com/login/oauth/authorize\n       clientAuthenticationScheme: form\n    resource:\n      user-info-uri: https://api.github.com/user\n      prefer-token-info: false \n\n```\n#### Spring Boot DevTools\n\n\t\nDevTools stands for Developer Tool. The aim of the module is to try and improve the development time while working with the Spring Boot application.\n\t\nSpring Boot DevTools pick up the changes and restart the application.\n\nWe can implement the DevTools in our project by adding the following dependency in the pom.xml file.\n\n```\t\n\u003cdependency\u003e  \n\u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e  \n\u003cartifactId\u003espring-boot-devtools\u003c/artifactId\u003e  \n\u003cscope\u003eruntime\u003cscope \u003e  \n\u003c/dependency\u003e\n```\t\n\n##### Spring Boot DevTools provides the following features:\n\n```\t\n* Property Defaults\n* Automatic Restart\n* LiveReload\n* Remote Debug Tunneling\n* Remote Update and Restart\t\n```\t\n\n##### LiveReload works on the following path:\n\t\n```\n\t\n/META-INF/maven\n/META-INF/resources\n/resources\n/static\n/public\n/templates\n\t\n```\n\t\n### Microservies-MSA\n\n###  Springboot with Microservies \n\n#### N-Tier and monolithic applications used to be the de facto standard. In one single binary web artifact, like an EAR or WAR file, there would be a layered architecture with the decomposition of code into more functional components.\n\n* Presentation Layer\n\n* Business Process Layer/Service Layer\n\n* Data Access Layer\n\n#### There are several disadvantages to the n-tier monolithic application architecture:\n\n* Tight coupling of code which makes changes hard.\n\n* A single deployment with multiple layers that causes long testing, building, and deployment cycles.\n\n* A big monolithic application that makes code reuse and sharing of components difficult.\n\n* The Microservices Architecture (MSA) decomposes systems into discrete, individual, standalone components that can communicate amongst themselves, working together or with external systems.\n\n\n* MSA is a more agile framework that fits well with the cloud-based world and lends itself well to web application development and web service development.\n\n#### MSA Features:\n\n* MSA is very flexible because it supports any language that can communicate via a RESTful endpoint and leverages REST over HTTP.\n\n* MSA offers agility and systems that are easier to write, test, deploy, and share.\n\n* MSA provides systems that can better scale to load and demand.\n\n* MSA provides systems that are resilient because failures are isolated and don’t cascade through the infrastructure.\n\n#### Eureka:\n\n* Eureka, created by Netflix, is responsible for the registration and discovery microservices. Spring has incorporated Eureka into Spring Cloud, making it even easier to stand up a Eureka server.\n\n* Eureka consists of a server and a client-side component. The server component will be the registry in which all the microservices register their availability. The microservices use the Eureka client to register; once the registration is complete, it notifies the server of its existence.\n\n\n#### What make a microservice different from a normal RESTful service?\n\n      A microservice must register itself with a discovery service\n      \n #### Eureka server to load:\n \n#### pom.xml:\n\n* spring cloud starter config\n*  spring  cloud netfli eureka server\n\n      \u003cdependency\u003e\n          \u003cgroupId\u003ejavax.xml.bind\u003c/groupId\u003e\n          \u003cartifactId\u003ejaxb-api\u003c/artifactId\u003e\n          \u003cversion\u003e2.4.0-b180725.0427\u003c/version\u003e\n      \u003c/dependency\u003e\n    \n#### application.properties:\n\n```\nspring.appliation.name=eurela-server\nserver.port=8761\n\n#dont register itself as client\n\neureka.client.regiser-with-eureka = false\neureka.client.fetch-registry= false\nlogging.level.com.netflix.eureka=ON\nlogging.level.com.netflix.discovery = ON\n```\n\n\n##### Starter:\n\n      @SpringBootApplication\n      @EnableEurekaServer\n\n##### login:\n\n      https://localhost:8761\n\n##### Eureka dashboard:\n\n* system status\n* current time -\u003e uptime \n* general Info -\u003e total memory, enviroment, cpus\n* DS replicas\n instane currently registered with Eureka\n\n##### Spring Data REST makes it easy to expose microservices. \n##### Spring Data REST builds on top of Spring Data repositories and automatically exports those as REST resources.\n\n#### So how does Spring Data Rest work?\n\n* At application startup, Spring Data Rest finds all of the spring data repositories\n\n* Then, Spring Data Rest creates an endpoint that matches the entity name\n\n* Next, Spring Data Rest appends an S to the entity name in the endpoint\n\n* Lastly, Spring Data Rest exposes CRUD (Create, Read, Update, and Delete) operations as RESTful APIs over HTTP\n\n* There is no need to create a controller or service layer!\n\n\u003ca href=\"https://github.com/sandysanthosh/Microservies-MSA/blob/master/Items.md\"\u003eItem Service\u003c/a\u003e\n\n\u003ca href=\"https://github.com/sandysanthosh/Microservies-MSA/blob/master/Eurekaclient.md\"\u003eEureka client\u003c/a\u003e\n \n#### pom.xml:\n\n* spring data\n\n* JPA Item Repository\n\n* Spring DATA REST\n\n* For a @SpringBootApplication to be discovery-aware, all that's needed is the Spring Discovery Client (i.e., spring-cloud-starter-netflix-eureka-client dependency) in the classpath. \n* The next step is to annotate the main Spring application class with the @EnableEurekaClient annotation.\n* @EnableEurekaClient is optional if the spring-cloud-starter-netflix-eureka-client dependency is on the classpath.\n\n```\n\nHTTP defines these standard status codes that can be used to convey the results of a client’s request. The status codes are divided into five categories.\n\n1xx: Informational – Communicates transfer protocol-level information.\n2xx: Success – Indicates that the client’s request was accepted successfully.\n3xx: Redirection – Indicates that the client must take some additional action in order to complete their request.\n4xx: Client Error – This category of error status codes points the finger at clients.\n5xx: Server Error – The server takes responsibility for these error status codes.\n\n```\n\n##### There are several ways to communicate between two Spring Boot applications:\n\n##### RESTful web services: \n\nOne application can expose its functionality as RESTful web services, which can be consumed by the other application using Spring's RestTemplate or WebClient.\n\n##### Messaging: \n\nApplications can use a messaging system such as Apache Kafka or RabbitMQ to send and receive messages. Spring provides support for both of these systems through the Spring Kafka and Spring Rabbit projects.\n\n##### Feign client: \n\nOne application can use the Feign client to make remote calls to the other application. Feign is a declarative web service client and can be used to communicate between applications using HTTP.\n\n##### gRPC:\n\nApplications can use gRPC to communicate with each other. gRPC is a high-performance, open-source framework for building remote procedure call (RPC) APIs. Spring provides support for gRPC through the Spring gRPC project.\n\n##### Data sharing:\n\nApplications can share data through a shared database or a data cache such as Redis or memcached. Spring provides support for various data sharing options through its Spring Data project.\n\n##### Service Discovery: \n\nSpring Cloud provides a way to register and discover microservices, one application can use service discovery to communicate with the other application.\n\nIt's depend on your requirement which one you want to use for communication between two spring boot application.\n\n\n```\n\nPackage Details:\n\n* ACEFMRSHWU\n\n* Config | Controller | Exception | Filters | Model | Repository | Headers | Resources | Security | Auth | Util | Webservice | Model | WSDL\n\n```\n\n\n![sb](https://user-images.githubusercontent.com/11579239/98439635-26930380-2119-11eb-818a-08535c9368f7.png)\n\n![image](https://user-images.githubusercontent.com/11579239/173381745-c0051833-0471-4763-9baf-1217753a20e6.png)\n\n![SPring Boot](https://user-images.githubusercontent.com/11579239/173742829-5953f093-876e-4c3f-ab6c-f34aa3fe7e3a.jpg)\n\n\t\n\u003ca href=\"http://starwalt.in/Blogs/index.html\"\u003eFollow us on Blog\u003c/a\u003e\n\n\u003cdiv align=\"right\"\u003e\n    \u003cb\u003e\u003ca href=\"#SpringBoot\"\u003e↥ Back To Top\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\t\n\t\n\t\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandysanthosh%2Fspring-boot-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandysanthosh%2Fspring-boot-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandysanthosh%2Fspring-boot-microservices/lists"}