Spring & SpringBoot Flashcards

1
Q

What is Spring Boot and What Are Its Main Features?

A

Spring Boot simplifies Java development by providing auto-configuration, embedded servers (Tomcat, Jetty), and a wide variety of starters that enable rapid development.

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

What Are the Differences Between Spring and Spring Boot?

A

Spring is a framework for enterprise-level development, while Spring Boot simplifies Spring by offering embedded servers, auto-configuration, and minimal setup.

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

How Can We Set up a Spring Boot Application With Maven?

A

You can create a Spring Boot application using spring-boot-starter dependencies and by setting the main class annotated with @SpringBootApplication.

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

What is Spring Initializr?

A

Spring Initializr is a web-based tool to quickly generate Spring Boot project structures with selected dependencies.

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

What Spring Boot Starters Are Available out There?

A

Examples include spring-boot-starter-web, spring-boot-starter-data-jpa, spring-boot-starter-security, and many others.

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

How to Disable a Specific Auto-Configuration?

A

You can disable auto-configuration using @EnableAutoConfiguration(exclude = {…}) or by excluding it in the application.properties.

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

How to Register a Custom Auto-Configuration?

A

Custom auto-configuration can be created by defining a class annotated with @Configuration and registering it in META-INF/spring.factories.

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

Use of Conditional annotation in Spring Boot and examples.

A

@Conditional is used to control bean creation based on a condition (e.g., @ConditionalOnMissingBean, @ConditionalOnProperty).

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