@Component @Scope(value="prototype", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class Proto{
}
@Component
public class Single{
@Autowired
private ObjectProvider<Proto> proto;
public Proto getProto() {
return proto.getIfAvailable();
}
}