Spring Boot makes it ways to create stand-clone, production-grade Srping based Applications that you can "just run".
Drawbacks of Spring
- Huge framework
- Multiple setup steps
- Multiple configuration steps
- Multiple build and deploy steps
#Learn @
https://www.youtube.com/watch?v=99Nw2smMTLg&index=3&list=PLqq-6Pq4lTTbx8p2oCgcAQGQyqN8XeA1x https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/
#Creating Spring Boot Project - create simple maven jar project
- Add spring-boot-starter-parent as a parent of your pom
- To enable it as a web project add. This downloads comman jars like tomcat,log4j...
- Run the Application.Create a class with main method.
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication public class StartApp { public static void main(String[] args) { SpringApplication.run(StartApp.class, args); } }
SpringApplication.run does the following: .Setsup the default configuration. .Starts Spring application context. .Performs classpath scan. .starts Tomcat server.