Spring Boot & Docker
Containerization with Docker: Dockerfile, multi-stage builds, optimized images, docker-compose, Spring profiles
1What is a layered JAR in Spring Boot?
What is a layered JAR in Spring Boot?
Resposta
A layered JAR organizes JAR content into distinct layers (dependencies, spring-boot-loader, snapshot-dependencies, application) to optimize Docker builds. Each layer can be cached separately, which significantly speeds up rebuilds since only modified layers are rebuilt. This approach reduces production deployment times by 80%.
2What is the role of Spring Boot Buildpacks?
What is the role of Spring Boot Buildpacks?
Resposta
Buildpacks automatically create optimized Docker images without requiring a Dockerfile. They detect the application type, install the appropriate runtime, configure JVM optimizations, and apply security best practices. This approach eliminates manual Dockerfile maintenance and ensures industry-standard compliant images.
3Which Dockerfile instruction to copy the JAR into the image?
Which Dockerfile instruction to copy the JAR into the image?
Resposta
The COPY instruction transfers files from the host system to the Docker image. For Spring Boot, we typically use COPY target/*.jar app.jar to copy the built JAR. This instruction creates a new layer in the image and supports wildcards for filename flexibility.
How to expose a port in a Dockerfile?
Which base image should be prioritized for a Spring Boot container in production?
+16 perguntas de entrevista
Outros temas de entrevista Spring Boot
Spring Core - IoC & DI
Spring Boot Auto-Configuration
Spring Boot Starters
Application Properties & YAML
Logging with SLF4J & Logback
Spring Boot DevTools
Spring MVC Basics
Spring REST Controllers
Request & Response Handling
Exception Handling
Bean Validation
Spring Data JPA Basics
JPA Entities & Relationships
JPA Queries
Spring Data Repositories
Spring Security Basics
Spring Boot Actuator
Unit Testing with JUnit & Mockito
Spring Boot Testing
Profiles & Environment
RestTemplate & WebClient
Async & Scheduling
Caching with Spring
Spring WebFlux (Reactive)
Spring Transactions
Advanced Authentication & Authorization
JWT & Stateless Security
OAuth2 & Authorization Server
Microservices with Spring
Spring Cloud Config
Performance Optimization
GraalVM Native Images
Domine Spring Boot para sua proxima entrevista
Acesse todas as perguntas, flashcards, testes tecnicos, exercicios de code review e simuladores de entrevista.
Comece gratis