Cloud-Native Applications in Java
上QQ阅读APP看书,第一时间看更新

Spring Boot

Spring Boot is rapidly becoming the most popular of the Java frameworks for building cloud-native microservices. Here are a few good reasons:

  • It has a foundation on Spring and Spring MVC, which is already popular in enterprises
  • Like Dropwizard, it assembles the most reasonable defaults and takes an opinionated approach to assembling the required dependencies for the services, reducing the XML required for configuration
  • It integrates Spring Cloud out of the box, which provides useful libraries such as Hystrix and Ribbon, for distributed service development that is required for cloud deployment
  • It has a lower learning curve; you can get started in minutes (as we shall see next)
  • It has the concept of 40+ starter Maven Project Object Models (POMs) that give good flexibility for choosing and developing applications

Spring Boot is suitable for a wide spectrum of the workloads that are suitable for cloud-native deployments and hence is a good first choice for most use cases.

Let's get into writing a service in Spring Boot now.