Spring Boot and Spring Cloud
Differences between Spring Boot and Spring Cloud
Before we introduce you to the differences between the two, it is better to know the meaning of each. Spring Boot is an open source framework developed for the Java programming language and used to build microservices. Spring boot was made to reduce test time. Spring Cloud, on the other hand, is used to manage configurations in the micro-service.
In order to be able to make a good comparison between these two, we preferred to list their characteristics in the table.
|Basic features||Spring cloud||Spring boot|
|libraries||has an open source library||has an open source library|
|Micro services||Manages configuration on microservices||Creates microservices|
|features||1- Ability to discover services intelligently: Discovering services is one of the four important services in creating microservices services.|
2- Service contact with services: This feature is in order to connect all dependent services with a sequence with an endpoint.
3- Load balance: This feature is efficient in order to generate network traffic in back-end services.
4- Leadership Election: A program that acts as a third-party system.
5- Global Lock: Lack of two items accessing a resource simultaneously
6- Configured and distributed messages
|1- Spring programs: Generate static spring programs by calling a static () run method.
2 - Web applications: Built-in Tomcat, Jetty or Undertow, you can build an HTTP server in this case does not need to deploy WAR files.
3- Externalized Configuration: Application-based programs produced by Spring Boot are effective in different environments.
4- Security: using basic authentication
5. Listers and events: Spring boot does the listers and events itself.
|annotations||1- @EnableConfigServer: With these Annotations, the program becomes a server. The biggest goal of this work is to understand their configuration.|
2- @EnableEurekaServer: These Annotations are used for Eureka Discovery applications, but can also be used to find services.
3- @EnableDiscoveryClient: Other services are
discovered by these Annotations.
4- @EnableCircuitBreaker: If other services fail, this service will be used.
5- @HystrixCommand2: These Annotations are used to mark the return method in another way that would not normally be successful.
|1- @SpringBootApplication: These Annotations are able to find any type of spring boot program.
2- @EnableAutoConfiguration: These Annotations are used if you use spring boots above 1.1.
3- @ContextConfiguration: These Annotations are used to test JUnit.
4- @SpringApplicationConfiguration: The function of these Annotations is similar to the function of
ContextConfiguration in Spring Boot.
5- @ConditionalOnBoot: These Annotations include a number of conditional Annotations as follows:
|application||Cloud applications||Product-ready and web applications|