- Check if the exception is about the beans you think it is. Because the names don't match
- Even if 1 is fixed, it is preferable to autowire by interface, not by concrete implementation. Most often (I can' know if this is true in your case), concrete implementations are proxied by spring (for transaction support, for exameplexample), and can be injected by interface only. And since you have two implementations of one interface, you have to provide a name, and either use
@Autowired+@Qualifier, or use@Resource(name="")to inject what you want. And there is nothing wrong with this.
- Check if the exception is about the beans you think it is. Because the names don't match
- Even if 1 is fixed, it is preferable to autowire by interface, not by concrete implementation. Most often (I can' know if this is true in your case), concrete implementations are proxied by spring (for transaction support, for examepl), and can be injected by interface only. And since you have two implementations of one interface, you have to provide a name, and either use
@Autowired+@Qualifier, or use@Resource(name="")to inject what you want. And there is nothing wrong with this.
- Check if the exception is about the beans you think it is. Because the names don't match
- Even if 1 is fixed, it is preferable to autowire by interface, not by concrete implementation. Most often (I can' know if this is true in your case), concrete implementations are proxied by spring (for transaction support, for example), and can be injected by interface only. And since you have two implementations of one interface, you have to provide a name, and either use
@Autowired+@Qualifier, or use@Resource(name="")to inject what you want. And there is nothing wrong with this.
- Check if the exception is about the beans you think it is. Because the names don't match
- Even if 1 is fixed, it is preferable to autowire by interface, not by concrete implementation. Most often (I can' know if this is true in your case), concrete implementations are proxied by spring (for transaction support, for examepl), and can be injected by interface only. And since you have two implementations of one interface, you have to provide a name, and either use
@Autowired+@Qualifier, or use@Resource(name="")to inject what you want. And there is nothing wrong with this.
default