Spring Boot Flashcards

1
Q

How is Spring Boot different from legacy Spring applications?

A

Spring Boot doesn’t need the boilerplate configurations to set up a Spring application.

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

What does it mean that Spring Boot is opinionated?

A

It uses dependencies to simplify the build of the application and gives developers a default configuration.

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

What annotation would you use for Spring Boot apps? What does it do behind the scenes?

A

@SpringBootApplication

It enables features for the auto-configuration of a Spring application.

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

How does Spring Boot’s autoconfiguration work?

A

It assumes the beans needed for your application, creates them, and wires them together.

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

What is the advantage of having an embedded Tomcat server?

A
  • eliminates the process of having to package as .war files and deploy on a web server.
  • offers easier way to package Java web applications
  • Individual applications can be taken offline or restarted without affecting others
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the significance of the Spring Boot starter POM?

A

It is a convenient set of dependency descriptors that you can include in your application. Your spring starter POM can be built conveniently through the Spring website.

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

What is the Spring Boot actuator?

A
  • a sub-project of the spring boot framework and uses HTTP endpoints to expose operational information about any running application.
  • In essence the actuator brings production-ready features to our application.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What information can the Spring Boot Actuator give you?

A

It gives developers production-grade tools without having to implement the features themselves.
For example, beans.

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

What files would you use to configure Spring Boot applications?

A

The application.properties or application.yaml files.

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

What is the benefit of using Spring Boot profiles?

A

It allows you to easily set the right configurations for certain environments. This way we are able to map our beans to different profiles such as prod, dev and test.

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

What does “convention over configuration” mean?

A

Spring boot specifically utilizes conventions to be able to abstract away the (configuration)boilerplate code that is required to get an application running.

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