You can think in Spring Boot like a framework for rapid developing java applications.
When we are developing java spring
applications there are some tasks that we have to perform to get our spring
project ready to code, that's tasks are:
- create a project structure (using commons tools like Maven,
Gradle o even doing it manually)
- configure the dependencies that our project need (Maven,
Gradle)
- your application may have Spring MVC, so you need to
setup this dependency to enable Spring MVC, also you have to configure to
servlet API dependency
- If you add Spring MVC to your project, you
should configure a web.xml file or a WebApplicationInitializar where
you declare the spring DispatcherServlet
- add some controller to your application to handle http
requests
- and finally add some web server application like,
tomcat, jetty or undertow to run your web application
Spring boot help us to develop web
applications configuring those mentioned steps for us automatically, so you can
focus on your business logic rather than spending time setting up those
configurations.
With spring boot, you can even run your
application in standalone thanks that spring boot have a tomcat web application
server embedded in it, this facilitates run our application without worry how to
where to deploy our app.
Thus, the magic of Spring boot is based
on 4 fundamental pillars which we can use in our day to day as developers:
1. Automatic
configuration:
Spring
boot can provide automatic configurations which are common for most
applications that use Spring Framework
2. Dependency
Initializer:
Spring
boot is responsible for choosing the correct dependencies based on the features
you want to use in your project
3. CLI
or Command Line Interface:
Although
this is an optional functionality, Spring boot offers a command line interface
to execute code or make configurations quickly
4. Actuator:
With
this tool we can take a look inside our application and know what is happening
within our application (Profiler).
In conclusion, Spring boot makes life
easier for us by providing certain configurations automatically, it is a tool
that we must consider when creating our projects, Spring boot does not solve
everything, there are still many things we must do manually depending on the
complexity of our project but I think it is an essential tool in the world of
Spring Framework development.
References:
Spring boot in Action (https://www.manning.com/books/spring-boot-in-action
)
No hay comentarios.:
Publicar un comentario