原来的代码如下: @Component public class TargetChargeFinder {@AutowiredChargeRepository chargeRepository; mock bean chargeRepository一直失败,且其值一直为null。原因在于,测试……