Spring boot is a module of spring framework which is used to create stand-alone, production-grade Spring based Applications with minimum programmer’s efforts. It is developed on top of core spring framework. The main concept behind spring boot is to avoid lot of boilerplate code and configuration to improve development, unit test etc. As in case of creating a new spring application, we have write many XML configurations, server setting, adding dependencies etc. These configuration files are one of the example of boilerplate code. Spring boot avoids all these boilerplate codes.
Spring boot components
- Spring Boot Starters: Main concept behind spring boot starters is to reduce the dependencies definitions and to simplify the project build dependencies. For example : if we are creating spring application than we have to define following dependencies in pom.xml file –
- Spring core Jar file
- Spring Web Jar file
- Spring Web MVC Jar file
- Servlet Jar file
- Spring Boot Starters provides the facility to add only one jar file spring-boot-starter-web instead of adding 4 jar files.
- Spring Boot AutoConfigurator: Main concept behind Spring Boot AutoConfigurator is to minimizing the programmer’s effort to define lots of XML configuration. It will take care of all these XML configurations and annotations.
- Spring Boot CLI: It is Spring Boot software which is used to run and test Spring Boot applications from command prompt. CLI refers to command line arguments. To execute a spring application, spring boot CLI uses Spring Boot Starter and Spring Boot AutoConfigurate components to resolve all dependencies.
- Spring Boot Actuator: Spring boot actuator is a tool which provides HTTP endpoints. We can manage our production application using these HTTP endpoints.