# GraalVM Native Images (Spring Boot) > Imagens nativas GraalVM para inicialização rápida, compilação nativa, AOT, reflection hints, limitações - 20 perguntas de entrevista - Senior - [Perguntas de entrevista: Spring Boot](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista.md) ## 1. O que é o GraalVM Native Image? **Resposta** GraalVM Native Image é uma tecnologia que compila aplicações Java em executáveis nativos autônomos via compilação AOT (Ahead-of-Time). Diferente da JVM tradicional que usa compilação JIT (Just-In-Time) em tempo de execução, o Native Image analisa e compila todo o código antecipadamente. Isso permite uma inicialização quase instantânea (milissegundos), menor consumo de memória e nenhuma dependência de uma JVM para execução. ## 2. Qual é a principal diferença entre a compilação AOT e JIT? **Resposta** A compilação AOT (Ahead-of-Time) analisa e compila todo o código antes da execução, produzindo um executável nativo otimizado. A compilação JIT (Just-In-Time) compila o bytecode Java em código de máquina de forma progressiva durante a execução. O AOT oferece inicialização instantânea, mas exige um tempo de build mais longo, enquanto o JIT inicia lentamente, mas otimiza o código ao longo do tempo com base nos padrões de uso reais. ## 3. Qual plugin do Maven usar para construir uma native image do Spring Boot? **Resposta** O native-maven-plugin do grupo org.graalvm.buildtools é o plugin oficial para construir native images com Maven. O Spring Boot starter parent o ativa automaticamente no profile 'native'. Basta declarar o plugin na seção plugins e executar mvn -Pnative spring-boot:build-image ou mvn -Pnative package conforme o modo desejado. ## Mais 17 perguntas disponiveis - Como ativar o profile do Maven para a compilação nativa do Spring Boot? - O que é o princípio de 'closed-world assumption' no GraalVM Native Image? Cadastre-se gratis: https://sharpskill.dev/pt/login ## Outros temas de entrevista Spring Boot - [Spring Core - IoC & DI](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-core-ioc-di.md): 22 perguntas, Junior - [Spring Boot Auto-Configuration](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-auto-configuration.md): 20 perguntas, Junior - [Spring Boot Starters](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-starters.md): 18 perguntas, Junior - [Application Properties & YAML](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/application-properties-yml.md): 16 perguntas, Junior - [Logging com SLF4J e Logback](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/logging.md): 20 perguntas, Junior - [Spring Boot DevTools](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-devtools.md): 15 perguntas, Junior - [Spring MVC Basics](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-mvc-basics.md): 20 perguntas, Mid-Level - [Spring REST Controllers](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-rest-controllers.md): 20 perguntas, Mid-Level - [Request & Response Handling](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/request-response-handling.md): 20 perguntas, Mid-Level - [Tratamento de exceções](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/exception-handling.md): 25 perguntas, Mid-Level - [Bean Validation](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/bean-validation.md): 25 perguntas, Mid-Level - [Fundamentos do Spring Data JPA](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-data-jpa-basics.md): 25 perguntas, Mid-Level - [Entidades JPA e relacionamentos](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/jpa-entities-relationships.md): 30 perguntas, Mid-Level - [Consultas JPA](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/jpa-queries.md): 30 perguntas, Mid-Level - [Spring Data Repositories](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-data-repositories.md): 25 perguntas, Mid-Level - [Fundamentos do Spring Security](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-security-basics.md): 25 perguntas, Mid-Level - [Spring Boot Actuator](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-actuator.md): 20 perguntas, Mid-Level - [Testes unitários com JUnit e Mockito](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/testing-junit-mockito.md): 30 perguntas, Mid-Level - [Testes no Spring Boot](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-testing.md): 30 perguntas, Mid-Level - [Profiles e Environment](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/profiles-environment.md): 20 perguntas, Mid-Level - [RestTemplate e WebClient](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/resttemplate-webclient.md): 24 perguntas, Mid-Level - [Async e Scheduling](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/async-scheduling.md): 25 perguntas, Mid-Level - [Caching com Spring](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/caching.md): 25 perguntas, Mid-Level - [Spring WebFlux (Reactive)](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-webflux.md): 25 perguntas, Mid-Level - [Transações do Spring](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/transactions.md): 30 perguntas, Senior - [Autenticação e autorização avançadas](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/authentication-authorization.md): 30 perguntas, Senior - [JWT e segurança stateless](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/jwt-stateless-security.md): 20 perguntas, Senior - [OAuth2 e Authorization Server](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/oauth2-authorization-server.md): 20 perguntas, Senior - [Spring Boot e Docker](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-boot-docker.md): 19 perguntas, Senior - [Microservices com Spring](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/microservices-basics.md): 25 perguntas, Senior - [Spring Cloud Config](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/spring-cloud-config.md): 19 perguntas, Senior - [Otimização de desempenho](https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/performance-optimization.md): 30 perguntas, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/technologies/spring-boot/perguntas-entrevista/graalvm-native-images