Building an Application with Spring Boot greatly accelerate the application development and helps developer to focus on implementing the business logic while less focus on App infrastructure. There are Spring Boot Starter packages which enable easy inclusion of required libraries for app development based on user specific requirement.
Some Core Spring Boot starter packages
Prerequisites for Spring Boot Project
- Any Code editor or IDE (Eclipse/IntelliJ)
- JDK 1.8 or Latter
- Java8 or latter Hands-on (good to have)
- Gradle 4+ or Maven 3.2+ (Build Tool)
Question: Why Spring Boot have run() Method in project Application.class?
- In Spring boot starter project and above all, run() method is available by default in SpringApplication.java class.
- This run() method returns the object of ConfigurableApplicationContext which have number of preloaded methods. getBean() is one method out of all available.
- The getBean() method is responsible to make sure the availablity of spring bean object when the scope of that bean is prototype.
Note: In absence of getBean() method, the prototype bean will not be able to provide the object for further functioning requirement.