Skip to content
InterviewEra
What is InterviewEraThe platform, founder, and missionHow It WorksAdaptive interview, live captions, scoringResume-aware ScoringCV-native questions + 5-dimension feedback
Campus Placements OverviewStructured mock interviews and cohort analytics for T&P teamsSet up Campus WorkspaceCreate your campus dashboard and invite your batchT&P Product & PricingPilot pricing, bulk onboarding, and placement trackingStudent Invitation HelpHow to accept a campus invite and start practising
Software EngineerDSA, system design, OOP roundsFrontend DeveloperReact, HTML/CSS, JavaScript interviewsTCS Interview QuestionsNQT + technical + HR roundsWipro Careers HubNLTH, WILP, Turbo hiring tracksSolera Careers HubCognitive assessment + Java/SQL roundsReact Interview QuestionsHooks, state, performance topics
Interview Question GeneratorRole-specific questions in secondsATS Resume CheckerScore your resume against job rolesSTAR Answer BuilderStructure behavioral answers clearly
All ResourcesCentral guide and hub directoryBlogInterview prep articles and guidesAgentic AI Interview GuideAI-assisted coding interviews, rubrics, and prepPlacement GuideStep-by-step campus prep playbookSTAR Method GuideMaster behavioral answers
Help CenterGuides, FAQs, and supportDSA Topic MapPatterns, roadmap, and top 50 problemsSoftware Engineer GuideSWE questions and prep hubAndroid GuideKotlin, Compose, MVVM prep hubFrontend GuideReact and JavaScript interviews
PricingFor Teams
Sign inSign up
InterviewEra

InterviewEra is an AI-powered mock interview platform with adaptive follow-ups, resume-aware scoring, and structured interview preparation for campus placements and early-career hiring.

Start Mock Interview

Mock Interview

  • How It Works
  • For Teams
  • Start Mock Interview
  • Campus Placements
  • Campus Workspace
  • Help Center

Free Tools

  • Interview Question Generator
  • ATS Resume Checker
  • STAR Answer Builder

Interview Questions

  • Wipro Careers Hub
  • Solera Careers Hub
  • Amazon SDE Questions
  • Microsoft SDE Questions
  • Infosys SWE Questions
  • Infosys Java Questions
  • Freshworks Frontend Questions
  • Android Developer Questions
  • Frontend Developer Questions
  • Java Developer Questions

Resources

  • Community Hub
  • All Resources
  • Blog
  • Agentic AI Interview Guide
  • What Is Agentic AI
  • Agentic Coding Round
  • AI Prompt Engineering
  • Cursor AI Interview Guide
  • DSA Topic Map
  • Placement Guide
  • STAR Guide
  • HR Guide
  • Interview Tips

Company

  • What is InterviewEra
  • About Us
  • Pricing
  • Contact

© 2026 InterviewEra. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›Topics›Spring Boot

Backend · Fresher-relevant

Spring Boot Interview Questions 2026

Spring Boot interview questions covering auto-configuration, REST controllers, JPA/Hibernate, and Spring Security.

BackendFresher-relevant

Spring Boot Interview Questions

Placement-oriented · Updated 2026
  1. 01

    What is dependency injection and how does Spring implement it?

    TechnicalMedium

    Tip: DI is providing a class's dependencies from outside rather than constructing them internally, enabling loose coupling and testability. Spring's IoC container creates and wires beans; prefer constructor injection (immutability, easier testing, no field reflection) over field injection.

  2. 02

    How does Spring Boot auto-configuration work?

    TechnicalHard

    Tip: @EnableAutoConfiguration (via @SpringBootApplication) scans the classpath and conditionally configures beans using @ConditionalOnClass / @ConditionalOnMissingBean. Starters pull curated dependencies; auto-config backs off whenever you define your own bean, so your configuration always wins.

  3. 03

    What is the difference between @Component, @Service, @Repository, and @Controller?

    TechnicalEasy

    Tip: All are stereotype annotations that register beans via component scanning. @Service marks business logic, @Repository marks the persistence layer (and translates DB exceptions into DataAccessException), @Controller/@RestController marks web endpoints. They are semantically distinct but technically specialisations of @Component.

  4. 04

    Explain the difference between @RequestParam, @PathVariable, and @RequestBody.

    TechnicalEasy

    Tip: @PathVariable binds a URL template segment (/users/{id}). @RequestParam binds a query string or form parameter (?page=2). @RequestBody deserialises the request body (usually JSON) into an object via Jackson. Use @Valid with @RequestBody to trigger bean validation.

  5. 05

    What are bean scopes in Spring?

    TechnicalMedium

    Tip: Default is singleton (one instance per container). prototype creates a new instance per injection. Web scopes include request, session, and application. Be careful injecting a shorter-lived scope into a singleton — use a proxy or ObjectProvider to avoid a stale reference.

  6. 06

    How does transaction management work with @Transactional?

    TechnicalHard

    Tip: @Transactional wraps a method in a transaction via an AOP proxy: commit on success, rollback on a RuntimeException by default (checked exceptions need rollbackFor). Because it is proxy-based, self-invocation within the same class bypasses it, and the method must be public. Tune propagation (REQUIRED, REQUIRES_NEW) and isolation as needed.

  7. 07

    What is the N+1 query problem in JPA/Hibernate and how do you fix it?

    TechnicalHard

    Tip: Lazy-loading a collection for N parent rows fires 1 query for the parents plus N queries for children. Fix with a JOIN FETCH / @EntityGraph to load eagerly in one query, or batch fetching (hibernate.default_batch_fetch_size). Detect it by logging SQL in dev.

  8. 08

    How do you secure REST endpoints in Spring Boot?

    TechnicalMedium

    Tip: Use Spring Security with a SecurityFilterChain: stateless JWT bearer tokens for APIs (no server session), method-level @PreAuthorize for role checks, BCrypt for password hashing, and HTTPS enforced. Disable CSRF for stateless token APIs but keep it for cookie-based sessions.

Practice Spring questions with your own resume

InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.

Start free mock interviewFree question generator

Roles that need Spring

  • Java Developer questions
  • Backend Developer questions

Related backend topics

  • Java questions
  • Python questions
  • Node.js questions
  • REST APIs questions
  • Django questions

Practice tools

  • Interview question generator
  • ATS resume checker
  • STAR answer builder

Guides and resources

  • All interview questions
  • HR interview answer tips
  • STAR method with examples