📜  Spring 和 Spring Boot 的区别

📅  最后修改于: 2021-09-13 02:51:06             🧑  作者: Mango

1. 春天:
Spring 是一个开源轻量级框架,它允许Java EE 7 开发人员构建简单、可靠且可扩展的企业应用程序。该框架主要侧重于提供各种方式来帮助您管理您的业务对象。与经典Java框架和应用程序编程接口 (API)(例如Java数据库连接 (JDBC)、JavaServer Pages (JSP) 和Java Servlet)相比,它使 Web 应用程序的开发更加容易。该框架使用各种新技术,如面向切面编程 (AOP)、Plain Old Java Object (POJO) 和依赖注入 (DI),来开发企业应用程序。

Spring框架可以看作是子框架的集合,也称为层,如Spring AOP。 Spring 对象关系映射 (Spring ORM)。 Spring Web Flow 和 Spring Web MVC。您可以在构建 Web 应用程序时单独使用这些模块中的任何一个。这些模块也可以组合在一起以在 Web 应用程序中提供更好的功能。

2. 弹簧靴:
Spring Boot 建立在传统的 spring 框架之上。因此,它提供了 spring 的所有功能,并且比 spring 更易于使用。 Spring Boot 是一个基于微服务的框架,可以在很短的时间内制作一个生产就绪的应用程序。在 Spring Boot 中,一切都是自动配置的。我们只需要使用适当的配置来利用特定的功能。如果我们想开发 REST API,Spring Boot 非常有用。

Spring 和 Spring Boot 的区别:

S.No. Spring Spring Boot
1. Spring is an open-source lightweight framework widely used to develop enterprise applications. Spring Boot is built on top of the conventional spring framework, widely used to develop REST APIs.
2. The most important feature of the Spring Framework is dependency injection. The most important feature of the Spring Boot is Autoconfiguration.
3.  It helps to create a loosely coupled application. It helps to create a stand-alone application.
4.  To run the Spring application, we need to set the server explicitly. Spring Boot provides embedded servers such as Tomcat and Jetty etc.
5. To run the Spring application, a deployment descriptor is required. There is no requirement for a deployment descriptor.
6. To create a Spring application, the developers write lots of code. It reduces the lines of code.
7. It doesn’t provide support for the in-memory database. It provides support for the in-memory database such as H2.