Spring Boot and Configuration Flashcards

1
Q

What is Spring Boot?

A

A framework built on top of Spring to simplify the configuration and deployment of Spring-based applications with minimal setup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Spring Boot starter?

A

Pre-configured sets of dependencies that make it easier to set up a Spring project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the @SpringBootApplication annotation do?

A

It combines @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you customize properties in a Spring Boot application?

A

By editing the application.properties or application.yml file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Spring Boot’s auto-configuration?

A

A feature that automatically configures Spring application based on the dependencies present on the classpath.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you define custom properties in Spring Boot?

A

By adding key-value pairs to application.properties and accessing them using @Value or @ConfigurationProperties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you run a Spring Boot application?

A

Using the main() method in a class annotated with @SpringBootApplication, or using the command mvn spring-boot:run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the @ConfigurationProperties annotation do?

A

t binds externalized properties to Java objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the default server in Spring Boot?

A

Tomcat, but you can switch to Jetty, Undertow, or others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you override default auto-configuration in Spring Boot?

A

By manually configuring the required beans or properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly