<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kundan kumar</title>
    <description>The latest articles on DEV Community by kundan kumar (@_kundan1).</description>
    <link>https://dev.to/_kundan1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4149014%2F9711baf0-ee39-4a96-9e2c-5cf1922b4e95.png</url>
      <title>DEV Community: kundan kumar</title>
      <link>https://dev.to/_kundan1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_kundan1"/>
    <language>en</language>
    <item>
      <title>1.Spring Boot Core &amp; Basics</title>
      <dc:creator>kundan kumar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 18:03:42 +0000</pubDate>
      <link>https://dev.to/_kundan1/1spring-boot-core-basics-2o52</link>
      <guid>https://dev.to/_kundan1/1spring-boot-core-basics-2o52</guid>
      <description>&lt;h2&gt;
  
  
  Demystifying Spring Boot Core &amp;amp; Basics: The Ultimate Deep-Dive Interview Guide
&lt;/h2&gt;

&lt;p&gt;Whether you are preparing for a senior engineering interview or architecting modern enterprise systems, &lt;strong&gt;Spring Boot Core &amp;amp; Basics&lt;/strong&gt; is the foundational filter interviewers use to distinguish developers who merely use annotations from those who understand the framework's runtime mechanics.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What is Spring Boot, and how is it different from the Spring Framework?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Core Philosophy
&lt;/h3&gt;

&lt;p&gt;The traditional &lt;strong&gt;Spring Framework&lt;/strong&gt; is an enterprise-grade Inversion of Control (IoC) and Dependency Injection (DI) framework. While modular and expressive, Spring historically suffered from &lt;strong&gt;configuration overhead&lt;/strong&gt;: developers had to manually wire database drivers, dispatchers, template engines, and transaction managers through hundreds of lines of XML or verbose &lt;code&gt;@Configuration&lt;/code&gt; classes, package them as WAR files, and deploy them to external servlet containers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring Boot&lt;/strong&gt; is not an alternative to the Spring Framework; it is an &lt;strong&gt;opinionated, rapid-application-development platform built directly on top of Spring&lt;/strong&gt;. It provides automatic configuration, production-grade observability, curated dependency sets, and embedded servers to turn multi-day setup pipelines into seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architectural Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Spring Framework&lt;/th&gt;
&lt;th&gt;Spring Boot&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Provides core DI, IoC, AOP, and modular enterprise capabilities.&lt;/td&gt;
&lt;td&gt;Eliminates boilerplate configuration and accelerates bootstrapping.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Configuration Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Explicit configuration&lt;/strong&gt;: Developers must define every &lt;code&gt;DataSource&lt;/code&gt;, &lt;code&gt;DispatcherServlet&lt;/code&gt;, and ViewResolver manually.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Convention over Configuration&lt;/strong&gt;: Applies opinionated defaults automatically via &lt;code&gt;@EnableAutoConfiguration&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Server &amp;amp; Deployment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires an external application server (Tomcat, Jetty, WildFly). Deployed as a &lt;strong&gt;WAR&lt;/strong&gt;.&lt;/td&gt;
&lt;td&gt;Contains an &lt;strong&gt;embedded servlet container&lt;/strong&gt; (Tomcat/Jetty/Undertow). Deployed as an executable &lt;strong&gt;fat JAR&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dependency Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual specification of every library and transitive version; high risk of version conflicts (JAR Hell).&lt;/td&gt;
&lt;td&gt;Uses &lt;strong&gt;Starters&lt;/strong&gt; and a centralized Bill of Materials (BOM) to eliminate version incompatibilities.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Production Readiness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires custom code or third-party libraries for health checks, metrics, and application telemetry.&lt;/td&gt;
&lt;td&gt;Native &lt;strong&gt;Actuator&lt;/strong&gt; endpoints out of the box (&lt;code&gt;/health&lt;/code&gt;, &lt;code&gt;/metrics&lt;/code&gt;, &lt;code&gt;/prometheus&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bootstrap Entry Point&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;web.xml&lt;/code&gt; or &lt;code&gt;WebApplicationInitializer&lt;/code&gt; mapped inside an external container.&lt;/td&gt;
&lt;td&gt;Standard Java &lt;code&gt;public static void main(String[] args)&lt;/code&gt; method invoking &lt;code&gt;SpringApplication.run()&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Interview Tip:&lt;/strong&gt; Emphasize that &lt;em&gt;Spring Boot does not generate code or replace Spring APIs&lt;/em&gt;. At runtime, it configures the exact same Spring beans you would have configured manually, using conditional evaluation (&lt;code&gt;@Conditional&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. What are the advantages of using Spring Boot?
&lt;/h2&gt;

&lt;p&gt;When an interviewer asks for advantages, avoid generic phrases like "it's fast." Group your response into structural architectural pillars:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Configuration (&lt;code&gt;@EnableAutoConfiguration&lt;/code&gt;):&lt;/strong&gt; Analyzes the classpath, system properties, and existing bean definitions to automatically wire the &lt;code&gt;ApplicationContext&lt;/code&gt; without boilerplate code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curated Starters (&lt;code&gt;spring-boot-starter-*&lt;/code&gt;):&lt;/strong&gt; Single, cohesive dependencies that aggregate compatible transitive libraries tested against a verified BOM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embedded Web Servers:&lt;/strong&gt; Bundles Apache Tomcat, Jetty, or Undertow directly into the application archive. No external container configuration or installation is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production-Ready Observability via Actuator:&lt;/strong&gt; Provides operational insights (metrics, health indicators, thread dumps, loggers, env variables) via secure HTTP/JMX endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Code Generation &amp;amp; Zero XML:&lt;/strong&gt; Relies entirely on runtime reflection, dynamic proxies, and Java metadata. No XML parsing bottlenecks or code synthesis steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-Native &amp;amp; Container Ergonomics:&lt;/strong&gt; Built-in support for Docker Layered JARs, Cloud-Native Buildpacks, Graceful Shutdown, and GraalVM Ahead-Of-Time (AOT) compilation for near-instant native startup.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. What is the purpose of the &lt;code&gt;@SpringBootApplication&lt;/code&gt; annotation?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;@SpringBootApplication&lt;/code&gt; is the primary meta-annotation placed on the root bootstrap class. It serves as the &lt;strong&gt;unified entry point&lt;/strong&gt; that activates Spring Boot’s auto-configuration engine, initiates component scanning, and defines the root configuration class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@SpringBootApplication&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InventoryServiceApplication&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;SpringApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;InventoryServiceApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Attributes Interviewers Expect You to Know:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;scanBasePackages&lt;/code&gt; / &lt;code&gt;scanBasePackageClasses&lt;/code&gt;:&lt;/strong&gt; Overrides the default component scan root package.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;exclude&lt;/code&gt; / &lt;code&gt;excludeName&lt;/code&gt;:&lt;/strong&gt; Excludes specific auto-configuration classes (e.g., &lt;code&gt;exclude = {DataSourceAutoConfiguration.class}&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;proxyBeanMethods&lt;/code&gt; (inherited from &lt;code&gt;@SpringBootConfiguration&lt;/code&gt;):&lt;/strong&gt; Controls whether &lt;code&gt;@Bean&lt;/code&gt; methods inside the class are wrapped in CGLIB dynamic proxies to enforce singleton lifecycle semantics (defaults to &lt;code&gt;true&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Which annotations does &lt;code&gt;@SpringBootApplication&lt;/code&gt; combine internally?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;@SpringBootApplication&lt;/code&gt; is composed of &lt;strong&gt;three fundamental annotations&lt;/strong&gt; (the "Spring Boot Trinity"):&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;@SpringBootConfiguration&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A specialization of Spring's standard &lt;code&gt;@Configuration&lt;/code&gt;. It marks the class as a source of bean definitions for the &lt;code&gt;ApplicationContext&lt;/code&gt;. The distinction is that &lt;code&gt;@SpringBootConfiguration&lt;/code&gt; allows Spring's testing infrastructure (&lt;code&gt;@SpringBootTest&lt;/code&gt;) to automatically locate the primary configuration root.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;@EnableAutoConfiguration&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Enables Spring Boot's auto-configuration discovery mechanism. Under the hood, it imports &lt;code&gt;AutoConfigurationImportSelector&lt;/code&gt;, which reads auto-configuration candidates from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports&lt;/code&gt; &lt;em&gt;(Spring Boot 3.x)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;META-INF/spring.factories&lt;/code&gt; &lt;em&gt;(Spring Boot 2.x)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;@ComponentScan&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Directs Spring to scan for classes annotated with &lt;code&gt;@Component&lt;/code&gt;, &lt;code&gt;@Service&lt;/code&gt;, &lt;code&gt;@Repository&lt;/code&gt;, &lt;code&gt;@Controller&lt;/code&gt;, and &lt;code&gt;@RestController&lt;/code&gt;. By default, scanning starts from the &lt;strong&gt;package of the annotated class&lt;/strong&gt; and scans downward through all sub-packages.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. What is the role of the &lt;code&gt;SpringApplication.run()&lt;/code&gt; method?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;SpringApplication.run()&lt;/code&gt; is not just a helper method; it is the &lt;strong&gt;orchestrator of the entire application bootstrap pipeline&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;ConfigurableApplicationContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SpringApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MyApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step-by-Step Execution Sequence
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instantiation of &lt;code&gt;SpringApplication&lt;/code&gt;:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Deduces the application type: &lt;code&gt;WebApplicationType.SERVLET&lt;/code&gt;, &lt;code&gt;REACTIVE&lt;/code&gt;, or &lt;code&gt;NONE&lt;/code&gt; (batch/worker) based on classpath markers.&lt;/li&gt;
&lt;li&gt;Loads &lt;code&gt;BootstrapRegistryInitializer&lt;/code&gt; and &lt;code&gt;ApplicationContextInitializer&lt;/code&gt; candidates.&lt;/li&gt;
&lt;li&gt;Loads &lt;code&gt;ApplicationListener&lt;/code&gt; instances from imports.&lt;/li&gt;
&lt;li&gt;Determines the main application entry-point class.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment Preparation:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Creates the &lt;code&gt;ConfigurableEnvironment&lt;/code&gt; (resolving OS environment variables, JVM system properties, command-line arguments, and &lt;code&gt;application.yml&lt;/code&gt;/&lt;code&gt;.properties&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Binds the environment to the Spring application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Banner Printing:&lt;/strong&gt; Prints the ASCII art banner unless explicitly suppressed (&lt;code&gt;Banner.Mode.OFF&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Creation:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Instantiates the matching &lt;code&gt;ApplicationContext&lt;/code&gt; (e.g., &lt;code&gt;AnnotationConfigServletWebServerApplicationContext&lt;/code&gt; for servlet-based web apps).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Preparation:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Applies initializers, attaches the prepared environment, registers command-line arguments, and fires the &lt;code&gt;ApplicationEnvironmentPreparedEvent&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Refresh (The Core Step):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Executes &lt;code&gt;refresh()&lt;/code&gt; from &lt;code&gt;AbstractApplicationContext&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Evaluates &lt;code&gt;BeanFactoryPostProcessors&lt;/code&gt;, registers &lt;code&gt;BeanPostProcessors&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Starts the embedded web server (e.g., binds Tomcat to port 8080).&lt;/li&gt;
&lt;li&gt;Eagerly instantiates all singleton beans.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Post-Refresh &amp;amp; Runner Execution:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Locates and invokes all beans implementing &lt;code&gt;ApplicationRunner&lt;/code&gt; and &lt;code&gt;CommandLineRunner&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event Publication:&lt;/strong&gt; Publishes the &lt;code&gt;ApplicationReadyEvent&lt;/code&gt;. The application is now fully initialized.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  6. What is the significance of the &lt;code&gt;main&lt;/code&gt; method in a Spring Boot application?
&lt;/h2&gt;

&lt;p&gt;In traditional Java EE architectures, the servlet container was the host process: Tomcat started first, parsed &lt;code&gt;web.xml&lt;/code&gt;, and loaded the application WAR into its memory space.&lt;/p&gt;

&lt;p&gt;In Spring Boot, this model is inverted (&lt;strong&gt;Inversion of Deployment&lt;/strong&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;Java &lt;code&gt;main&lt;/code&gt; method is the driver of the entire operating system process&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The application runs as a standalone Java process (&lt;code&gt;java -jar my-service.jar&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The embedded Tomcat/Jetty server is treated as an internal Spring bean inside the &lt;code&gt;ApplicationContext&lt;/code&gt; rather than an external supervisor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvtqtmaqbjuiij0tc3ol8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvtqtmaqbjuiij0tc3ol8.png" alt="question6" width="800" height="879"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When packaged as an executable Fat JAR, the &lt;code&gt;Main-Class&lt;/code&gt; entry in &lt;code&gt;META-INF/MANIFEST.MF&lt;/code&gt; points to Spring Boot's internal loader class: &lt;code&gt;org.springframework.boot.loader.launch.JarLauncher&lt;/code&gt;. This launcher sets up an isolated class loader capable of reading nested JARs and finally delegates execution to your application's &lt;code&gt;main()&lt;/code&gt; method.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Explain the concept of "opinionated defaults" in Spring Boot.
&lt;/h2&gt;

&lt;p&gt;"Opinionated Defaults" embodies the &lt;strong&gt;Convention over Configuration&lt;/strong&gt; pattern. Spring Boot makes educated, opinionated assumptions about how a modern production backend should be constructed, providing pre-configured sensible defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default Server:&lt;/strong&gt; Assumes you need Apache Tomcat listening on port &lt;code&gt;8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default Database Connection Pool:&lt;/strong&gt; Assumes &lt;strong&gt;HikariCP&lt;/strong&gt; is the best connection pool for performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default JSON Parser:&lt;/strong&gt; Assumes &lt;strong&gt;Jackson&lt;/strong&gt; (&lt;code&gt;ObjectMapper&lt;/code&gt;) is the serialization engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default Logging Engine:&lt;/strong&gt; Assumes &lt;strong&gt;SLF4J with Logback&lt;/strong&gt;, pre-configured for console output with ANSI color-coding and timestamp formatting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default ORM Provider:&lt;/strong&gt; Assumes &lt;strong&gt;Hibernate&lt;/strong&gt; when Spring Data JPA is present.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The "Escape Hatch" Principle
&lt;/h3&gt;

&lt;p&gt;Spring Boot is opinionated, but &lt;strong&gt;not stubborn&lt;/strong&gt;. Every single default can be overridden. If you define your own custom bean, Spring Boot's conditional logic (&lt;code&gt;@ConditionalOnMissingBean&lt;/code&gt;) detects it and steps back.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. What is the difference between Spring Boot and Spring MVC?
&lt;/h2&gt;

&lt;p&gt;This is one of the most frequently asked basic questions in junior to mid-level interviews. Many developers confuse the two because &lt;code&gt;spring-boot-starter-web&lt;/code&gt; pulls in Spring MVC.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tabular Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Spring MVC&lt;/th&gt;
&lt;th&gt;Spring Boot&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Framework Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Presentation-tier Web &amp;amp; REST framework.&lt;/td&gt;
&lt;td&gt;Application bootstrapping and auto-configuration framework.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Architectural Scope&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Focuses strictly on HTTP handling: &lt;code&gt;DispatcherServlet&lt;/code&gt;, Controllers, Request Mappings, and Model/View binding.&lt;/td&gt;
&lt;td&gt;Focuses on the &lt;strong&gt;entire application lifecycle&lt;/strong&gt;: dependency packaging, configuration, metrics, embedded runtimes, and persistence wiring.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Servlet Setup&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires manual registration of &lt;code&gt;DispatcherServlet&lt;/code&gt; in &lt;code&gt;web.xml&lt;/code&gt; or via &lt;code&gt;WebApplicationInitializer&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;Automatically creates, configures, and registers &lt;code&gt;DispatcherServlet&lt;/code&gt; at &lt;code&gt;/&lt;/code&gt; out of the box.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Server Requirement&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cannot run on its own; must be deployed onto an external servlet container (Tomcat, Jetty).&lt;/td&gt;
&lt;td&gt;Runs independently as a standalone JVM process using an embedded web server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Relation to Each Other&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Built within the core Spring Framework.&lt;/td&gt;
&lt;td&gt;Packages, auto-configures, and manages Spring MVC via &lt;code&gt;spring-boot-starter-web&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  9. What are the different ways to create a Spring Boot application?
&lt;/h2&gt;

&lt;p&gt;There are 4 standard mechanisms to scaffold a Spring Boot application:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Spring Initializr Web UI (&lt;code&gt;start.spring.io&lt;/code&gt;):&lt;/strong&gt; The official web generator allowing developers to select build tools (Maven/Gradle), language (Java/Kotlin/Groovy), Spring Boot version, packaging (JAR/WAR), Java baseline, and dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IDE Built-in Wizards:&lt;/strong&gt; IntelliJ IDEA Ultimate, Eclipse (STS - Spring Tool Suite), and VS Code (Spring Boot Extension Pack) integrate directly with the Spring Initializr API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot CLI (&lt;code&gt;spring init&lt;/code&gt;):&lt;/strong&gt; A terminal-based tool enabling fast CLI scaffolding (e.g., &lt;code&gt;spring init -d=web,data-jpa --build=gradle my-app&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Build Configuration:&lt;/strong&gt; Writing a &lt;code&gt;pom.xml&lt;/code&gt; or &lt;code&gt;build.gradle&lt;/code&gt; file manually by adding &lt;code&gt;spring-boot-starter-parent&lt;/code&gt; and desired starters, then creating a &lt;code&gt;@SpringBootApplication&lt;/code&gt; entry point.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  10. What is Spring Initializr, and how do you use it?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Spring Initializr&lt;/strong&gt; is an extensible web service and open-source project (&lt;code&gt;spring-io/initializr&lt;/code&gt;) that generates the skeleton structure for Spring Boot applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it Works Internally
&lt;/h3&gt;

&lt;p&gt;Initializr exposes a RESTful metadata API endpoint at &lt;code&gt;https://start.spring.io&lt;/code&gt;. When you interact with the UI, IDE, or CLI, it sends an HTTP GET/POST request with query parameters describing the project requirements. The service returns a dynamically assembled &lt;code&gt;.zip&lt;/code&gt; archive containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Standard Maven/Gradle directory structure (&lt;code&gt;src/main/java&lt;/code&gt;, &lt;code&gt;src/main/resources&lt;/code&gt;, &lt;code&gt;src/test/java&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Pre-configured &lt;code&gt;pom.xml&lt;/code&gt; or &lt;code&gt;build.gradle&lt;/code&gt; containing correct starters and BOM definitions.&lt;/li&gt;
&lt;li&gt;Maven Wrapper (&lt;code&gt;mvnw&lt;/code&gt;, &lt;code&gt;.mvn/&lt;/code&gt;) or Gradle Wrapper (&lt;code&gt;gradlew&lt;/code&gt;) to ensure consistent builds without local tool installations.&lt;/li&gt;
&lt;li&gt;Default &lt;code&gt;application.properties&lt;/code&gt; or &lt;code&gt;application.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A baseline &lt;code&gt;@SpringBootApplication&lt;/code&gt; class and a passing context-load test.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using Spring Initializr via cURL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://start.spring.io/starter.zip &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;dependencies&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;web,data-jpa,postgresql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;javaVersion&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;21 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;bootVersion&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3.3.0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;artifactId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;order-service &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;order-service &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-o&lt;/span&gt; order-service.zip &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; unzip order-service.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  11. What is the minimum Java version required for Spring Boot 3.x?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Direct Answer
&lt;/h3&gt;

&lt;p&gt;The minimum requirement for Spring Boot 3.x is &lt;strong&gt;Java 17 LTS&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deep Architectural Rationale (Senior Interview Perspective)
&lt;/h3&gt;

&lt;p&gt;When interviewers ask this question, they are testing whether you understand the structural ecosystem changes that occurred between Spring Boot 2.x and 3.x:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Jakarta EE 9/10 Namespace Migration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Oracle transferred Java EE to the Eclipse Foundation. Due to trademark restrictions on the &lt;code&gt;javax&lt;/code&gt; name, all enterprise packages changed from &lt;code&gt;javax.*&lt;/code&gt; to &lt;code&gt;jakarta.*&lt;/code&gt; (e.g., &lt;code&gt;jakarta.persistence&lt;/code&gt;, &lt;code&gt;jakarta.servlet&lt;/code&gt;, &lt;code&gt;jakarta.annotation&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Spring Boot 3 completely dropped support for &lt;code&gt;javax.*&lt;/code&gt; web/persistence specifications.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Java Language Features in Framework Internals:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Spring Framework 6.x and Spring Boot 3.x internally leverage modern Java features including Java &lt;strong&gt;Records&lt;/strong&gt; for immutable DTOs/projections, sealed classes, pattern matching, and enhanced switch expressions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraalVM Native Image Compilation:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Spring Boot 3 introduced first-class Ahead-Of-Time (AOT) engine support powered by GraalVM. AOT requires Java 17+ bytecode semantics to generate optimized native binaries with sub-50ms startup times.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual Threads (Project Loom):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Beginning in Spring Boot 3.2+ (on Java 21 LTS), applications can execute high-throughput blocking I/O using lightweight Virtual Threads by setting a single property:
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;   &lt;span class="py"&gt;spring.threads.virtual.enabled&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  12. What are the key components of Spring Boot?
&lt;/h2&gt;

&lt;p&gt;Spring Boot is constructed around &lt;strong&gt;five foundational subsystems&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot Starters:&lt;/strong&gt; Curated dependency descriptors grouping functional dependencies under a unified version management umbrella.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Configuration Engine:&lt;/strong&gt; The conditional configuration subsystem driven by &lt;code&gt;@EnableAutoConfiguration&lt;/code&gt; and &lt;code&gt;@Conditional*&lt;/code&gt; annotations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot Actuator:&lt;/strong&gt; The operations management module exposing runtime telemetry, health indicators, audit hooks, and metric scrapers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot DevTools:&lt;/strong&gt; The developer productivity engine providing classloader-isolated live reloads, automatic server restarts, and cache invalidation during development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot CLI:&lt;/strong&gt; The command-line interface leveraging Groovy and Grape for rapid prototyping and executable scripting.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  13. What is &lt;code&gt;spring-boot-starter-parent&lt;/code&gt; and why is it used?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;spring-boot-starter-parent&lt;/code&gt; is a special parent POM in Maven that enterprise applications can inherit from to establish a standardized build and runtime baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  What It Configures Under the Hood:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Centralized Dependency Management:&lt;/strong&gt; Inherits from &lt;code&gt;spring-boot-dependencies&lt;/code&gt; (the master BOM). It manages compatible versions for over 200 common third-party libraries (Hibernate, Jackson, Logback, Mockito, etc.). You do not need to specify &lt;code&gt;&amp;lt;version&amp;gt;&lt;/code&gt; tags in your own dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default Compiler Configuration:&lt;/strong&gt; Sets default Java version source/target flags and enforces &lt;code&gt;UTF-8&lt;/code&gt; character encoding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Filtering:&lt;/strong&gt; Configures Maven resource filtering on &lt;code&gt;application.properties&lt;/code&gt; and &lt;code&gt;application.yml&lt;/code&gt; files, allowing property interpolation using the &lt;code&gt;@..@&lt;/code&gt; delimiter syntax (e.g., &lt;code&gt;app.version=@project.version@&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugin Configurations:&lt;/strong&gt; Pre-configures plugins like &lt;code&gt;spring-boot-maven-plugin&lt;/code&gt;, &lt;code&gt;maven-surefire-plugin&lt;/code&gt;, and &lt;code&gt;maven-failsafe-plugin&lt;/code&gt; with repackaging goals to produce executable fat JARs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What if You Cannot Inherit from &lt;code&gt;spring-boot-starter-parent&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;Many enterprises require projects to inherit from an internal corporate parent POM (&lt;code&gt;corp-parent-pom&lt;/code&gt;). In Maven, multiple inheritance is illegal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt; Import the BOM directly in the &lt;code&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/code&gt; section using &lt;code&gt;scope=import&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-dependencies&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.3.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;import&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  14. How does Spring Boot simplify dependency management?
&lt;/h2&gt;

&lt;p&gt;Traditional Java projects frequently suffer from &lt;strong&gt;"JAR Hell"&lt;/strong&gt;—runtime &lt;code&gt;ClassNotFoundException&lt;/code&gt; or &lt;code&gt;NoSuchMethodError&lt;/code&gt; caused by transitive dependency collisions (e.g., Library A pulls Jackson &lt;code&gt;2.12&lt;/code&gt;, while Library B pulls Jackson &lt;code&gt;2.15&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Spring Boot resolves this using a two-tier strategy:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Bill of Materials (BOM) Pattern
&lt;/h3&gt;

&lt;p&gt;Through &lt;code&gt;spring-boot-dependencies&lt;/code&gt;, the Spring team rigorously tests and curates an exact matrix of compatible versions across the entire Java backend ecosystem. When you declare dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Notice: NO &amp;lt;version&amp;gt; tag! --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-boot-starter-data-jpa&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.fasterxml.jackson.core&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;jackson-databind&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The version is automatically resolved to the exact compatible version defined by the BOM, completely eliminating manual version coordination.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Functional Aggregation (Starters)
&lt;/h3&gt;

&lt;p&gt;Instead of searching for and adding separate dependencies for Spring Web, Tomcat, Jackson Core, Jackson Databind, and Jakarta Validation, you add &lt;strong&gt;one starter&lt;/strong&gt;: &lt;code&gt;spring-boot-starter-web&lt;/code&gt;. The starter brings in the entire cohesive stack.&lt;/p&gt;




&lt;h2&gt;
  
  
  15. What is the Spring Boot CLI and what can you do with it?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Spring Boot CLI&lt;/strong&gt; is a lightweight command-line interface designed for rapid prototyping, system automation, and script execution using Groovy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Capabilities:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run Standalone Groovy Scripts (&lt;code&gt;spring run&lt;/code&gt;):&lt;/strong&gt; Allows you to write concise Groovy files without explicit package declarations, imports, or build files. The CLI uses Groovy Grape (&lt;code&gt;@Grab&lt;/code&gt;) to automatically resolve missing imports (like &lt;code&gt;@RestController&lt;/code&gt;, &lt;code&gt;@GetMapping&lt;/code&gt;) and download corresponding starters on the fly:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight groovy"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HelloController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;home&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"Hello from Spring Boot CLI!"&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Executing &lt;code&gt;spring run HelloController.groovy&lt;/code&gt; compiles the script, downloads Spring Web, spins up an embedded Tomcat server, and serves the endpoint on port 8080.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project Scaffolding (&lt;code&gt;spring init&lt;/code&gt;):&lt;/strong&gt; Generates new Spring Boot skeletons from the terminal:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spring init &lt;span class="nt"&gt;--dependencies&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;web,data-jpa &lt;span class="nt"&gt;--build&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;maven my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Packaging Executables (&lt;code&gt;spring jar&lt;/code&gt;):&lt;/strong&gt; Packages Groovy scripts into standard executable fat JARs (&lt;code&gt;spring jar app.jar HelloController.groovy&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  series navigation
&lt;/h3&gt;

&lt;p&gt;⬅️ &lt;strong&gt;Previous:&lt;/strong&gt; &lt;a href="https://dev.to/_kundan1/spring-boot-java-backend-interview-preparation-complete-roadmap-dd8"&gt;Series Introduction &amp;amp; Roadmap&lt;/a&gt;&lt;br&gt;
➡️ &lt;strong&gt;Next:&lt;/strong&gt; &lt;a href="https://dev.toPART_02_URL"&gt;Part 02 — Auto-Configuration &amp;amp; Configuration&lt;/a&gt;&lt;br&gt;
📌 &lt;strong&gt;&lt;a href="https://dev.to/_kundan1/spring-boot-java-backend-interview-preparation-complete-roadmap-dd8"&gt;View the Complete Series Roadmap&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>java</category>
      <category>springboot</category>
      <category>interview</category>
    </item>
    <item>
      <title>Spring Boot &amp; Java Backend Interview Preparation: Complete Roadmap</title>
      <dc:creator>kundan kumar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 17:55:27 +0000</pubDate>
      <link>https://dev.to/_kundan1/spring-boot-java-backend-interview-preparation-complete-roadmap-dd8</link>
      <guid>https://dev.to/_kundan1/spring-boot-java-backend-interview-preparation-complete-roadmap-dd8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;250+ real &amp;amp; frequently asked questions&lt;/strong&gt; covering the entire Spring Boot ecosystem, from basics to advanced. Organized by topic with difficulty indicators.&lt;/p&gt;

&lt;p&gt;🟢 Basic | 🟡 Intermediate | 🔴 Advanced&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Spring Boot Core &amp;amp; Basics&lt;/li&gt;
&lt;li&gt;Auto-Configuration&lt;/li&gt;
&lt;li&gt;Configuration &amp;amp; Properties&lt;/li&gt;
&lt;li&gt;Profiles&lt;/li&gt;
&lt;li&gt;Embedded Servers &amp;amp; Deployment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To be published ...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spring Boot Starters&lt;/li&gt;
&lt;li&gt;Spring Boot Actuator&lt;/li&gt;
&lt;li&gt;Spring Boot DevTools&lt;/li&gt;
&lt;li&gt;Spring Core — IoC &amp;amp; Dependency Injection&lt;/li&gt;
&lt;li&gt;Bean Lifecycle &amp;amp; Scopes&lt;/li&gt;
&lt;li&gt;Spring Annotations Deep Dive&lt;/li&gt;
&lt;li&gt;Aspect-Oriented Programming (AOP)&lt;/li&gt;
&lt;li&gt;Spring MVC &amp;amp; Web Layer&lt;/li&gt;
&lt;li&gt;REST API Design &amp;amp; Best Practices&lt;/li&gt;
&lt;li&gt;Exception Handling&lt;/li&gt;
&lt;li&gt;Request Validation&lt;/li&gt;
&lt;li&gt;Filters &amp;amp; Interceptors&lt;/li&gt;
&lt;li&gt;Spring Data JPA &amp;amp; Hibernate&lt;/li&gt;
&lt;li&gt;JPA Entity Relationships &amp;amp; Mapping&lt;/li&gt;
&lt;li&gt;Querying &amp;amp; Performance (JPA)&lt;/li&gt;
&lt;li&gt;Transaction Management&lt;/li&gt;
&lt;li&gt;Spring Security&lt;/li&gt;
&lt;li&gt;JWT, OAuth2 &amp;amp; Authentication&lt;/li&gt;
&lt;li&gt;Spring Boot Testing&lt;/li&gt;
&lt;li&gt;Microservices Architecture&lt;/li&gt;
&lt;li&gt;Microservices Design Patterns&lt;/li&gt;
&lt;li&gt;Spring Cloud&lt;/li&gt;
&lt;li&gt;Messaging — Kafka, RabbitMQ, JMS&lt;/li&gt;
&lt;li&gt;Caching — Redis, Spring Cache&lt;/li&gt;
&lt;li&gt;Java Concurrency &amp;amp; Async&lt;/li&gt;
&lt;li&gt;Reactive Programming &amp;amp; WebFlux&lt;/li&gt;
&lt;li&gt;Database, Migrations &amp;amp; Connection Pooling&lt;/li&gt;
&lt;li&gt;Logging &amp;amp; Monitoring&lt;/li&gt;
&lt;li&gt;Docker, Kubernetes &amp;amp; Cloud Deployment&lt;/li&gt;
&lt;li&gt;Performance Tuning&lt;/li&gt;
&lt;li&gt;Miscellaneous &amp;amp; Scenario-Based&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>java</category>
      <category>springboot</category>
      <category>interview</category>
    </item>
    <item>
      <title>SlumberSafe: An AI-Led Bedside Companion to Park Your Worries</title>
      <dc:creator>kundan kumar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 06:19:02 +0000</pubDate>
      <link>https://dev.to/_kundan1/slumbersafe-an-ai-led-bedside-companion-to-park-your-worries-12d5</link>
      <guid>https://dev.to/_kundan1/slumbersafe-an-ai-led-bedside-companion-to-park-your-worries-12d5</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built SlumberSafe, a voice-first, AI-led bedside companion designed for a close friend who struggles with late-night anxiety and "doomscrolling" before bed.&lt;/p&gt;

&lt;p&gt;Whenever they try to sleep, their brain starts reminding them of unfinished tasks, emails they forgot to send, and worries about tomorrow. SlumberSafe solves this by acting as a calm, empathetic listener. You simply lie in bed, tap "Start Wind-Down", and dictate your worries. The AI listens, naturally responds with comforting reassurance, and quietly extracts any actionable tasks you mention, safely "parking" them in a MongoDB database for the next morning. Finally, it gently guides you to sleep with a whispered bedtime story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://slumber-safe-x8cd.vercel.app/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;slumber-safe-x8cd.vercel.app&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kundan424" rel="noopener noreferrer"&gt;
        kundan424
      &lt;/a&gt; / &lt;a href="https://github.com/kundan424/slumberSafe" rel="noopener noreferrer"&gt;
        slumberSafe
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🌙 SlumberSafe: Bedside Debrief &amp;amp; Doomscroll Deterrent&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Built for Hacktoberfest 2026 (#hf26challenge) — DEV Challenge #1: "Build for a Friend"&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;A private, voice-first bedtime decompression companion designed to break the late-night racing thoughts and doomscrolling cycle.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 The Story &amp;amp; Problem Statement&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Late at night around 11:00 PM, unfinished to-dos, racing thoughts, and tomorrow's stresses create bedtime friction. To cope with bedtime anxiety, many people turn to blue light feeds and social media, doomscrolling past 1:00 or 2:00 AM.&lt;/p&gt;
&lt;p&gt;Commercial AI chatbots fail at this use case:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;They require staring into bright text chat UIs.&lt;/li&gt;
&lt;li&gt;They do not automatically lock away to-dos for the next morning.&lt;/li&gt;
&lt;li&gt;They log intimate vulnerable thoughts onto closed commercial cloud servers.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;SlumberSafe&lt;/strong&gt; solves this with an OLED screen-free voice companion powered by open-weight AI (Meta's Llama 3.3 via Groq) and soft whispered bedside audio (ElevenLabs).&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features (MVP Scope)&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Late-Night Doomscroll Interceptor Banner&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Active bedtime…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kundan424/slumberSafe" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;I wanted SlumberSafe to be lightning fast and completely hands-free. To achieve this, I built the app using Next.js 14 (App Router) and relied heavily on open-weight AI models.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"assistant_response"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1-2 warm conversational sentences."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tasks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Finish the report tomorrow morning"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"normal"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"next_question"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"A short natural follow-up question."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"session_complete"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"should_offer_story"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the Llama 3.3 70B open-weight model via the Groq SDK. Llama 3.3 is incredibly fast and capable of deep empathy and structured JSON extraction in a single pass.&lt;/p&gt;

&lt;p&gt;I engineered a prompt that forces the LLM to output a strict JSON schema on every conversational turn:&lt;/p&gt;

&lt;p&gt;This allows the backend to automatically map the extracted tasks into MongoDB Atlas, while streaming the assistant_response back to the frontend to be spoken aloud using the native Web Speech API (webkitSpeechRecognition) and ElevenLabs for realistic whispered TTS.&lt;/p&gt;

&lt;p&gt;The frontend implements a strict state machine (LISTENING → PROCESSING → AI_SPEAKING) to prevent the microphone from picking up the AI's own voice and creating an echo loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open innovation made this project possible by providing access to world-class, open-weight models like Llama 3.3. If I had to rely on a slow, closed API, the conversational latency would ruin the relaxing, bedside experience. Because Llama is open and hosted on ultra-fast inference hardware like Groq, the responses feel instantaneous and natural. Open innovation also allows us to run these powerful models locally or on edge devices in the future, meaning sensitive, late-night personal thoughts wouldn't even need to leave the user's bedroom network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Open-Weight AI: For leveraging Llama 3.3 to handle empathy and data extraction simultaneously.&lt;br&gt;
Accessibility &amp;amp; UX: For building a completely hands-free, dark-themed voice interface designed for tired eyes.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
