Tag

ObjectProvider

0 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 22, 2024 · Backend Development

Spring Dependency Injection Tricks: Optional, Provider, Collections, @Value & @Lazy

This article demonstrates various Spring dependency‑injection techniques—including Optional, ObjectProvider, Provider, arrays, collections, maps, @Value literals and SpEL expressions, as well as @Lazy proxies—showing the code and resulting bean representations for each approach.

JavaLazyObjectProvider
0 likes · 6 min read
Spring Dependency Injection Tricks: Optional, Provider, Collections, @Value & @Lazy
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 21, 2023 · Backend Development

Mastering Spring’s ObjectProvider: Flexible Dependency Injection Techniques

Spring’s ObjectProvider interface enhances dependency injection by allowing optional, lazy, and multiple bean retrieval, offering methods like getIfAvailable, orderedStream, and stream, with code examples demonstrating on-demand injection, fetching all implementations, and the underlying mechanism via DependencyObjectProvider in the DefaultListableBeanFactory.

JavaObjectProviderSpring
0 likes · 8 min read
Mastering Spring’s ObjectProvider: Flexible Dependency Injection Techniques