I have an Interface IMenuItem
public interface IMenuItem {
String getIconClass();
void setIconClass(String iconClass);
String getLink();
vo
i believe half of job is done by your @scope annotation , if there is not any-other implementation of ImenuItem interface in your project below will create multiple instances
@Autowired
private IMenuItem menuItem
but if there are multiple implementations, you need to use @Qualifer annotation .
@Autowired
@Qualifer("MenuItem")
private IMenuItem menuItem
this will also create multiple instances