Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Paul Clapham
Sheriffs:
paul wheaton
Tim Cooke
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Piet Souris
Bartenders:
Mike London
Forum:
Spring
What happens if my class has name for both annotations @Component and @Qualifier?
Stefan Jankovic
Ranch Hand
Posts: 57
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
If I have designed this:
@Component("toyA") @Qualifier("toyB") public class Toy { ... }
, tell me what happens inside IOC container? Is my bean with class Toy named
toyA
or
toyB
? And how is this even possible; I get no compilation errors...
Stephan van Hulst
Saloon Keeper
Posts: 14702
331
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why wouldn't it be possible for a component to have two names?
Stefan Jankovic
Ranch Hand
Posts: 57
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hmmm sounds simply
Does that mean that inside Container we now have two references to the same object? References named
toyA
and
toyB
?
Stephan van Hulst
Saloon Keeper
Posts: 14702
331
posted 1 year ago
Number of slices to send:
Optional 'thank-you' note:
Send
That sounds reasonable.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Good Design of JSF
Inversion of Control:question
org.springframework.web.servlet.DispatcherServlet - Context initialization failed
understanding the basic MVC flow with JSF
Basic Autowiring Mismatch
More...