Tag

Primary

0 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 12, 2024 · Backend Development

Mastering Spring Boot Bean Selection: 6 Ways to Choose the Right Implementation

This tutorial walks through six practical techniques—@Qualifier, @Primary, @Profile, collection injection, @Priority, and custom @Conditional—to control which implementation of a Spring Boot interface is autowired, complete with code examples and usage tips.

JavaPrimaryQualifier
0 likes · 8 min read
Mastering Spring Boot Bean Selection: 6 Ways to Choose the Right Implementation
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 6, 2024 · Backend Development

How @Fallback Redefines Spring Bean Selection in 6.2

This article explains the new @Fallback annotation introduced in Spring 6.2, compares it with @Primary, shows code examples of bean configuration, and details the bean selection order changes before and after the 6.2 release.

BeanFallbackJava
0 likes · 5 min read
How @Fallback Redefines Spring Bean Selection in 6.2
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 1, 2024 · Backend Development

How to Precisely Choose a DAO Implementation in Spring: 8 Injection Techniques

This article explains eight practical ways to control which DAO implementation Spring injects, covering @Qualifier, bean naming, custom qualifiers, manual lookup, profile‑based beans, @Primary, and @Priority, with complete code examples for each method.

Custom AnnotationPrimaryQualifier
0 likes · 7 min read
How to Precisely Choose a DAO Implementation in Spring: 8 Injection Techniques