Spring vs Spring Boot

Same Engine, Less Setup

Spring Boot is not a replacement for Spring. It is Spring, with the setup work done for you. Compare what you had to do for a web API before and after Boot:

TaskClassic Spring (before Boot)Spring Boot
Project setuppick and match dozens of library versions by handchoose starters on start.spring.io; versions are managed
ConfigurationXML files or many @Configuration classesauto-configuration + application.properties
Web serverinstall Tomcat, build a WAR, deploy itembedded Tomcat, run java -jar
JSONregister a message converter yourselfJackson configured automatically
Health / metricswrite your ownSpring Boot Actuator
Time to "Hello API"an hour or moreabout five minutes

Classic Spring XML (the old way)

<!-- applicationContext.xml : every object declared by hand -->
<beans xmlns="http://www.springframework.org/schema/beans">
    <bean id="productRepository" class="com.shopease.ProductRepository"/>
    <bean id="productService" class="com.shopease.ProductService">
        <constructor-arg ref="productRepository"/>
    </bean>
    <!-- + DispatcherServlet in web.xml, view resolvers, Jackson converters, a WAR for Tomcat ... -->
</beans>

Spring Boot (the modern way)

package com.shopease;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication          // turns on component scanning + auto-configuration
public class ShopeaseApplication {
    public static void main(String[] args) {
        SpringApplication.run(ShopeaseApplication.class, args);   // starts Spring + embedded Tomcat
    }
}

Tip: In interviews, say it like this: "Spring Boot = Spring Framework + auto-configuration + starters + embedded server + production features. It removes boilerplate, it does not replace Spring."