The difference between Spring Boot and Spring Framework

There are several major differences between Spring Boot and Spring Framework (often just called Spring):

  1. Simplify configuration : One of the main goals of Spring Boot is to simplify the configuration and startup process of Spring applications. It provides the principle of "convention over configuration", which means that if you follow the default configuration, you can get a Spring application up and running with less configuration. In comparison, traditional Spring Framework requires more configuration.

  2. Embedded server : Spring Boot provides support for embedded servers (such as Tomcat, Jetty, or Undertow), which makes developing and testing Web applications more convenient. In the traditional Spring Framework, you need to configure and manage the web server separately.

  3. Auto-configuration : Spring Boot attempts to automatically configure a Spring application based on the dependencies added to the project. For example, if your classpath contains a JDBC driver for a database, Spring Boot will automatically configure a data source. In Spring Framework, these configurations need to be done manually.

  4. No code generation and XML configuration : Spring Boot supports using Java configuration instead of XML. Although Spring Framework also supports Java configuration, Spring Boot encourages developers to use XML as little as possible.

  5. Application monitoring : Spring Boot provides various features to help monitor the running status of applications, such as health checks, metric collection, etc.

  6. Microservice friendly : Spring Boot is very suitable for the development of microservice architecture. It makes it easy to create independently running microservice applications.

In summary, Spring Boot is built on the Spring Framework. It inherits the core features of Spring, while providing a faster development experience, simplifying the configuration process, and is suitable for rapid development and deployment of microservices and applications.

Guess you like

Origin blog.csdn.net/qqerrr/article/details/135398663