Spring Boot

Spring Boot Starters

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

18 pertanyaan wawancara·
Junior
1

What is a Spring Boot Starter?

Jawaban

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?

Jawaban

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?

Jawaban

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 pertanyaan wawancara

Kuasai Spring Boot untuk wawancara berikutnya

Akses semua pertanyaan, flashcards, tes teknis, latihan code review dan simulator wawancara.

Mulai gratis