有没有可能使用Spring上下文来确定哪个类需要注入我的bean?我为我的bean使用了Java only配置。假设我有这个bean:@Scope("prototype") return new Helper();现在我想知道这个实例将被注入到哪个类中,以便为这个类注入一个特殊的实例。; return new Helper();b
我想通过使用Dependency的依赖项注入类Microsoft.Extensions.DependencyInjection的特定实例。问题是我不想注入new Dependency(),而是将参数传递给(它的)构造函数之一,如new Dependency(parameters);。依赖项和依赖项()类
public class Dependency // I don't want (or rather have the possibili