Spring Boot

Spring Core - IoC & DI

Inversion of Control, Dependency Injection, annotations (@Component, @Autowired, @Bean), scopes, bean lifecycle

22 คำถามสัมภาษณ์·
Junior
1

What is Inversion of Control (IoC) in Spring?

คำตอบ

IoC is a principle where the Spring framework manages object creation and lifecycle, rather than the developer. This reverses the traditional control flow where application code directly instantiates its dependencies. Spring uses an IoC container to manage beans and their dependencies declaratively.

2

What is a bean in Spring?

คำตอบ

A bean is an object managed by the Spring IoC container. It is instantiated, configured and assembled by Spring according to configuration metadata (annotations, XML or Java config). Beans are the core of a Spring application and benefit from dependency injection.

3

What is the purpose of the @Component annotation?

คำตอบ

The @Component annotation marks a class as a Spring bean to be automatically detected during component scanning enabled by @ComponentScan. Spring creates an instance of this class and places it in the IoC container with a default name (class in camelCase). It's the generic stereotype annotation from which @Service, @Repository and @Controller derive to bring specific business semantics.

4

What are the three types of dependency injection in Spring?

5

How does the @Autowired annotation work?

+19 คำถามสัมภาษณ์

หัวข้อสัมภาษณ์ Spring Boot อื่นๆ

Spring Boot Auto-Configuration

Junior
20 คำถาม

Spring Boot Starters

Junior
18 คำถาม

Application Properties & YAML

Junior
16 คำถาม

Logging with SLF4J & Logback

Junior
20 คำถาม

Spring Boot DevTools

Junior
15 คำถาม

Spring MVC Basics

Mid-Level
20 คำถาม

Spring REST Controllers

Mid-Level
20 คำถาม

Request & Response Handling

Mid-Level
20 คำถาม

Exception Handling

Mid-Level
25 คำถาม

Bean Validation

Mid-Level
25 คำถาม

Spring Data JPA Basics

Mid-Level
25 คำถาม

JPA Entities & Relationships

Mid-Level
30 คำถาม

JPA Queries

Mid-Level
30 คำถาม

Spring Data Repositories

Mid-Level
25 คำถาม

Spring Security Basics

Mid-Level
25 คำถาม

Spring Boot Actuator

Mid-Level
20 คำถาม

Unit Testing with JUnit & Mockito

Mid-Level
30 คำถาม

Spring Boot Testing

Mid-Level
30 คำถาม

Profiles & Environment

Mid-Level
20 คำถาม

RestTemplate & WebClient

Mid-Level
24 คำถาม

Async & Scheduling

Mid-Level
25 คำถาม

Caching with Spring

Mid-Level
25 คำถาม

Spring WebFlux (Reactive)

Mid-Level
25 คำถาม

Spring Transactions

Senior
30 คำถาม

Advanced Authentication & Authorization

Senior
30 คำถาม

JWT & Stateless Security

Senior
20 คำถาม

OAuth2 & Authorization Server

Senior
20 คำถาม

Spring Boot & Docker

Senior
19 คำถาม

Microservices with Spring

Senior
25 คำถาม

Spring Cloud Config

Senior
19 คำถาม

Performance Optimization

Senior
30 คำถาม

GraalVM Native Images

Senior
20 คำถาม

เชี่ยวชาญ Spring Boot สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี