mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-25 18:20:46 +02:00
Update Spring Boot scope content (#3398)
This commit is contained in:
@@ -11,7 +11,7 @@ The scope of a bean determines the lifecycle and visibility of the bean within t
|
|||||||
- **application**: This scope is for global application-level data, and only valid in a web-aware Spring ApplicationContext.
|
- **application**: This scope is for global application-level data, and only valid in a web-aware Spring ApplicationContext.
|
||||||
- **websocket**: This scope is for global WebSocket-level data, and also only valid in a web-aware Spring ApplicationContext.
|
- **websocket**: This scope is for global WebSocket-level data, and also only valid in a web-aware Spring ApplicationContext.
|
||||||
|
|
||||||
The scope of a bean can be specified in the configuration file using the scope attribute of the bean element. For example, to configure a bean with the prototype scope, you would use the following XML configuration:
|
The scope of a bean can be specified in the configuration file using the scope attribute of the bean element.
|
||||||
|
|
||||||
It is very important to choose the right scope for a bean, as it can affect the behavior and performance of the application.
|
It is very important to choose the right scope for a bean, as it can affect the behavior and performance of the application.
|
||||||
|
|
||||||
@@ -19,4 +19,4 @@ Visit the following links for more resources:
|
|||||||
|
|
||||||
- [Spring - Bean Scopes](https://www.tutorialspoint.com/spring/spring_bean_scopes.htm)
|
- [Spring - Bean Scopes](https://www.tutorialspoint.com/spring/spring_bean_scopes.htm)
|
||||||
- [Quick Guide to Spring Bean Scopes](https://www.baeldung.com/spring-bean-scopes)
|
- [Quick Guide to Spring Bean Scopes](https://www.baeldung.com/spring-bean-scopes)
|
||||||
- [Spring Bean Scopes](https://www.digitalocean.com/community/tutorials/spring-bean-scopes)
|
- [Spring Bean Scopes](https://www.digitalocean.com/community/tutorials/spring-bean-scopes)
|
||||||
|
Reference in New Issue
Block a user