What is the difference between Spring Framework and Spring Boot


It is necessary to write a site using Spring and Hibernate. Which is better to choose for the first time: Spring Framework or Spring Boot?


Not sure how well you represent the difference between Spring Boot and Spring MVC, so I'll try to explain.

Spring MVC is a framework for developing Web applications. Internally, it uses Spring Core (i.e. all components, both yours and the framework itself, are beans in a container that manages both their life cycle and their dependencies).

And here, Spring Boot? Deploying a typical Spring MVC and, say, Hibernate application requires you as a programmer to write some code. Moreover, as a rule, this configuration code is the same for standard projects. In order to make life easier for developers and newbies who can't set up a project right away, the Spring Boot project appeared. It has pre-prepared pieces of configuration that are activated depending on various conditions. For example, if you have Hibernate in the classpath, then the beans for Spring and Hibernate are configured automatically. If you have a JAR file in the classpath for working with the H2 database, then it is automatically expanded and Hibernate is configured to work with it. Etc. for various components.

Total. You might want to try spring-boot as it is. in it, most likely, you will have to write less code to configure this entire economy. But, if you need a little non-standard configuration, and your knowledge of the Spring Framework is not enough, then you may have problems with how to configure it.

It's up to you to decide, of course.

Scroll to Top