Skip to content

Commit 9db82ee

Browse files
auto-configuration question
1 parent eea83c4 commit 9db82ee

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ This repository contains interview questions for Java developers.
9696
- [What creates a proxy?](spring.md#what-creates-a-proxy)
9797
- [Does @transactional method work in the case of execution in the same class?](spring.md#does-transactional-method-work-in-the-case-of-execution-in-the-same-class)
9898
- [What is environment?](spring.md#what-is-environment)
99+
- [How does auto-configuration work?](spring.md#how-does-auto-configuration-work)
99100

100101
## Servlet
101102
- [What is servlet?](servlet.md#what-is-servlet)

spring.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [What creates a proxy?](#what-creates-a-proxy)
2121
- [Does @transactional method work in the case of execution in the same class?](#does-transactional-method-work-in-the-case-of-execution-in-the-same-class)
2222
- [What is environment?](#what-is-environment)
23+
- [How does auto-configuration work?](#how-does-auto-configuration-work)
2324

2425
## How make spring service thread-safe?
2526
There are several ways, probably too long to list here but here are a few examples:
@@ -166,4 +167,9 @@ Properties play an important role in almost all applications, and may originate
166167
###### Relative links:
167168
- https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/env/Environment.html
168169

170+
## How does auto-configuration work?
171+
Under the hood, auto-configuration is implemented with standard @Configuration classes. Additional @Conditional annotations are used to constrain when the auto-configuration should apply. Usually, auto-configuration classes use @ConditionalOnClass and @ConditionalOnMissingBean annotations. This ensures that auto-configuration applies only when relevant classes are found and when you have not declared your own @Configuration.
172+
###### Relative links:
173+
- https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-auto-configuration.html
174+
169175
[Home Page](README.md)

0 commit comments

Comments
 (0)