Spring Boot Flashcards
How is Spring Boot different from legacy Spring applications?
Spring Boot doesn’t need the boilerplate configurations to set up a Spring application.
What does it mean that Spring Boot is opinionated?
It uses dependencies to simplify the build of the application and gives developers a default configuration.
What annotation would you use for Spring Boot apps? What does it do behind the scenes?
@SpringBootApplication
It enables features for the auto-configuration of a Spring application.
How does Spring Boot’s autoconfiguration work?
It assumes the beans needed for your application, creates them, and wires them together.
What is the advantage of having an embedded Tomcat server?
- 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
What is the significance of the Spring Boot starter POM?
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.
What is the Spring Boot actuator?
- 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.
What information can the Spring Boot Actuator give you?
It gives developers production-grade tools without having to implement the features themselves.
For example, beans.
What files would you use to configure Spring Boot applications?
The application.properties or application.yaml files.
What is the benefit of using Spring Boot profiles?
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.
What does “convention over configuration” mean?
Spring boot specifically utilizes conventions to be able to abstract away the (configuration)boilerplate code that is required to get an application running.