I have been started use Spring recently. And I didn't find the solution to my problem.
I have a component:
@Component
@Scope(value = "prototype", proxyMode = ScopedProxyMode.TARGET_CLASS)
@Log4j2
public class CompX { ....
I would like to use it twice in a (component) class:
...
@Autowired
private CompX current;
@Autowired
private CompX old;
...
How can I do this? Always got following exception.
"org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type..."