Closed zhouandke closed 2 years ago
类定义 public interface IA { } public interface IB { }
public class A : IA { [Autowired] private readonly IB B; }
public class B : IB { [Autowired] private readonly IA A; }
注册 services.AddScoped<IA, A>(); services.AddScoped<IB, B>();
services.AddScoped<IA, A>(); services.AddScoped<IB, B>();
当controller有一个 IB 的字段时,就会导致溢出
已做增强pr,等待仓主发版吧 :)
2.3.1版本已经发布
类定义 public interface IA { } public interface IB { }
public class A : IA { [Autowired] private readonly IB B; }
public class B : IB { [Autowired] private readonly IA A; }
注册
services.AddScoped<IA, A>(); services.AddScoped<IB, B>();
当controller有一个 IB 的字段时,就会导致溢出