InterviewTreedInterviewTreed

The question library

Technical interview questions and answers

Explore practical questions, clear explanations, and code examples across developer technologies.

Showing 1993–2004 of 3610 questions

Java & Spring BootIntermediate1 min read

Describe bean lifecycle callbacks.

Spring creates a bean, injects dependencies, applies post-processors, invokes initialization callbacks, and eventually runs destruction callbacks for managed beans when the context closes

Java & Spring BootIntermediate1 min read

What is Spring AOP?

Spring AOP separates cross-cutting behavior such as transactions and method interception from business logic

Java & Spring BootIntermediate1 min read

Filter vs HandlerInterceptor

A servlet Filter runs at the servlet layer before MVC dispatch; a HandlerInterceptor participates in Spring MVC handler execution and can access handler metadata

Java & Spring BootIntermediate1 min read

What is CORS?

CORS is a browser-enforced policy in which the server states which cross-origin requests are allowed

Java & Spring BootIntermediate1 min read

What is method security?

Method security applies authorization policies to service or method calls, complementing URL-based rules

Java & Spring BootIntermediate1 min read

How do you unit-test a service?

Unit tests construct a service with controlled collaborators and test observable behavior without loading the full application context

Java & Spring BootIntermediate1 min read

What is @SpringBootTest?

@SpringBootTest loads the application context for integration-style tests of configuration and bean wiring

Java & Spring BootIntermediate1 min read

What is @DataJpaTest?

@DataJpaTest focuses on entity and repository behavior and commonly rolls back test transactions

Java & Spring BootIntermediate1 min read

Why use Testcontainers?

Testcontainers runs disposable services such as PostgreSQL or Kafka for tests, providing more realistic integration behavior than many in-memory substitutes