Problem with Autowiring & No unique bean
Posted
by mada
on Stack Overflow
See other posts from Stack Overflow
or by mada
Published on 2010-04-23T15:03:53Z
Indexed on
2010/04/23
20:33 UTC
Read the original article
Hit count: 286
spring
I have 2 classes (B,C) extends class A.
@Service
public class A extends AbstratClass<Modele>{
@Autowired
A(MyClass br) {
super(br);
}
@Service
public class B extends A{
@Autowired
B (MyClass br) {
super(br);
}
@Service
public class C extends A{
@Autowired
C (MyClass br) {
super(br);
}
But i have this message:
No unique bean of type [A] ] is defined: expected single matching bean but found 2: [A, B, moveModeleMarshaller]
I really cant get why i have this message & how to resolve even after reading Spring documentation.
Thanks in advance.
© Stack Overflow or respective owner