Spring Boot

Spring Boot Starters

Starters (web, data-jpa, security, test), transitive dependencies, BOM, custom starters

18 câu hỏi phỏng vấn·
Junior
1

What is a Spring Boot Starter?

Câu trả lời

A starter is a dependency descriptor that automatically bundles all necessary libraries for a specific use case, with compatible versions tested together. This eliminates the need to manually search for each dependency and automatically manages transitive dependencies. For example, spring-boot-starter-web includes Spring MVC, embedded Tomcat, Jackson for JSON, and all their compatible dependencies.

2

What is the naming convention for official Spring Boot starters?

Câu trả lời

All official Spring Boot starters follow the naming convention spring-boot-starter-*, where the asterisk represents the type of application or functionality. This convention allows immediately distinguishing official starters maintained by the Spring Boot team from community-created third-party starters which use the reverse pattern *-spring-boot-starter. This distinction is important for trust and compatibility. Official examples: spring-boot-starter-web, spring-boot-starter-data-jpa, spring-boot-starter-security.

3

What is the role of spring-boot-starter-parent in a project?

Câu trả lời

The spring-boot-starter-parent is a Maven parent POM that provides centralized version management for all Spring Boot dependencies and compatible third-party libraries. It also defines default Maven configurations such as UTF-8 encoding, Java version, and build plugins. Thanks to it, there is no need to specify versions for managed dependencies, which ensures compatibility and simplifies maintenance.

4

What are transitive dependencies in a starter?

5

Which starter to use for creating a REST web application with Spring Boot?

+15 câu hỏi phỏng vấn

Nắm vững Spring Boot cho lần phỏng vấn tiếp theo

Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.

Bắt đầu miễn phí