Spring Boot and Configuration Flashcards
What is Spring Boot?
A framework built on top of Spring to simplify the configuration and deployment of Spring-based applications with minimal setup.
What is a Spring Boot starter?
Pre-configured sets of dependencies that make it easier to set up a Spring project.
What does the @SpringBootApplication annotation do?
It combines @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations.
How can you customize properties in a Spring Boot application?
By editing the application.properties or application.yml file.
What is Spring Boot’s auto-configuration?
A feature that automatically configures Spring application based on the dependencies present on the classpath.
How do you define custom properties in Spring Boot?
By adding key-value pairs to application.properties and accessing them using @Value or @ConfigurationProperties.
How can you run a Spring Boot application?
Using the main() method in a class annotated with @SpringBootApplication, or using the command mvn spring-boot:run.
What does the @ConfigurationProperties annotation do?
t binds externalized properties to Java objects.
What is the default server in Spring Boot?
Tomcat, but you can switch to Jetty, Undertow, or others.
How can you override default auto-configuration in Spring Boot?
By manually configuring the required beans or properties.