Spring boot Flashcards

1
Q

What does the Spring IoC (Inversion of Control) container do?

A

Manages the creation, configuration, and lifecycle of application beans.

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

In a Spring Boot project, which file is used to manage Maven dependencies?

A

pom.xml

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

Which Spring Boot starter would you use for building a web, RESTful application using Spring MVC?

A

spring-boot-starter-web

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

What is the role of the @SpringBootApplication annotation in a Spring Boot application?

A

It marks the main class of a Spring Boot application and triggers auto-configuration, component scanning, and configuration.

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

How can you define a Spring bean in a configuration class?

A

By annotating a method with @Bean

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

What logging framework does Spring Boot use by default when starters are included

A

Request

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

In a typical Spring Boot project structure, where should the controller classes be placed?

A

src/main/java/[package]/controller

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

What is a key characteristic of a Java Bean?

A

It must have a public no-argument constructor.

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