Why Spring Boot over Spring?
Let us know, if Spring was solving all the problems, then what is the need for Spring Boot at all?
The reason why we need Spring Boot is we are changing or shifting towards applications like microservices and with microservices, one of the most important thing aim is we would want to be able to develop applications very quickly. So instead of building one large application, we would like to build ten small microservices, which have their own scope and their own capabilities. Spring-based applications have lots of configurations. It can be of XML configuration, Java configuration or annotations, etc. For example, If we want to use Spring MVC, we need to use @ComponentScan annotation, Dispatcher servlet, view resolver, web jars, etc. This kind of configuration makes it slow to develop an application. So, in this place, Spring Boot Autoconfiguration comes in. It looks at what types of frameworks are available at the classpath and it looks at what configurations are provided by the programmers or what configurations are provided already for the application. It will look at both of them. Data is not configured but there is hibernation on the classpath, so it will configure the data source automatically. It will configure the in-memory database, it will configure the dispatcher servlet automatically. This is called autoconfiguration. Spring Boot creates a starter project by which all the XML configurations and dependencies get by default.