

We also had to manually add Spring MVC dependencies and manage their versions. We had to create web.xml and spring context file. In the last tutorial on Spring RestController, we created a Spring RESTful web service and deployed it on Tomcat. SpringBootApplication and SpringApplication Example This class is very helpful in launching Spring MVC or Spring REST application using Spring Boot. This class automatically creates the ApplicationContext from the classpath, scan the configuration classes and launch the application. Spring Boot SpringApplication class is used to bootstrap and launch a Spring application from a Java main method.

It’s same as declaring a class with and annotations. Spring Boot annotation is used to mark a configuration class that declares one or more methods and also triggers auto-configuration and component scanning.
