Spring Boot Flashcards

1
Q

What are some important features of using spring boot?

A
  1. Starter dependency: this feature aggregates common dependencies together.
  2. Auto-configuration
  3. Spring initializer: project setup
  4. Spring actuator: insights of a running spring boot application. Find out which beans are created in Springs app context and which request path are mapped to controllers
  5. spring CLI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is auto-configuration in spring boot?

A

configures a lot of things based upon what is present in the classpath

  • its disabled by default, you need to use either @SpringBootApplication or @EnableAutoConfiguration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between @SpringBootApplication and @EnableAutoConfiguration?

A

@EnableAutoConfiguration is used to enable auto-configuration but @SpringBootApplication does a lot more than that, it also combines @Configuration(declared one or more bean methods and may be processed by spring container) and @ComponentScan

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

Where do you define properties in Spring Boot application?

A

you can define both application and spring boot related properties into a file called application.properties

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