In this blog post I am gonna give you all an introduction on Spring Boot, an application framework and inversion controller for the java platform.
Before diving in to Spring Boot framework, let's get a brief idea about the Spring framework on top of which the Spring Boot was created.
Spring is a very popular application framework for java web and enterprise and web applications which was initially written by Rod Johnson.Millions and millions of people around the world use this to make their codes high performing, easily testable and reusable.Spring framework is build on top of the Dependency Injection (DI) concept.
Let's think of Dependency injection as two terms, "Dependency" and Ïnjection".
As we all already know "Dependency" is that one class needs another class to complete its functionalities.And that needed class will be "Injected" to the dependent class.
Although Spring was a very popular framework among the users, it had several drawbacks.
Step 2:Give the Group(Package name) and the Artifact(Project name) and dependencies.Based on the selected dependencies the web interface will automatically add Spring boot starter dependencies in the POM file.If you need more control on the project, you can click on the "Switch to the full version"link).Then click on the generate project button.Then a zip file will be automatically downloaded.
Step 3: Extract the zip file to a prefered location and open the project with Eclipse or any similar IDE.Your folder structure will look like like this.
Now you are ready to go!
This blog post gives you just a start to the Spring Boot framework and there are many more exciting features.So it's up to you all to explore them and give a try.
Before diving in to Spring Boot framework, let's get a brief idea about the Spring framework on top of which the Spring Boot was created.
Spring is a very popular application framework for java web and enterprise and web applications which was initially written by Rod Johnson.Millions and millions of people around the world use this to make their codes high performing, easily testable and reusable.Spring framework is build on top of the Dependency Injection (DI) concept.
What is Dependency Injection?
When it comes to a complex java application, the classes should not be depending on one another, in order to reuse our code and to make the unit testing easy.For such situations, dependency injection is used to connect the classes together while making them independent.So what exactly happens here?Let's think of Dependency injection as two terms, "Dependency" and Ïnjection".
As we all already know "Dependency" is that one class needs another class to complete its functionalities.And that needed class will be "Injected" to the dependent class.
Although Spring was a very popular framework among the users, it had several drawbacks.
- Lot of configurations needed.
- Boilerplate code are harder to manage and bootstrapping a project involves lot of time
- Integration of frameworks or libraries are harder
- No clear support for microservices
So as a solution the Sring team came up with the Spring Boot framework.With spring the starting hassle is gone and you can get started in no time!Together with that it brings,
- Convention over Configuration
- Standardization for Microservice
- Integrated (embedded) server for development
- Support for 3rd party libraries
- Easier integration with other frameworks.
Now let's see how to get started with Spring Boot.There are several ways to get started and in this post I'll be explaining you the simplest way to generate the project structure (using the Spring Intializer).
Step 1:Go to Spring Initializer
Step 2:Give the Group(Package name) and the Artifact(Project name) and dependencies.Based on the selected dependencies the web interface will automatically add Spring boot starter dependencies in the POM file.If you need more control on the project, you can click on the "Switch to the full version"link).Then click on the generate project button.Then a zip file will be automatically downloaded.
This blog post gives you just a start to the Spring Boot framework and there are many more exciting features.So it's up to you all to explore them and give a try.
Comments
Post a Comment