Java Spring中具有相同名称的多个字段

Java Spring中具有相同名称的多个字段,java,spring,autowired,entity-bean,Java,Spring,Autowired,Entity Bean,我有以下几点: public class ClaimFacadeImpl implements ClaimFacade { @Autowired private DebtRepository<Claim> debtRepository; @Autowired private DebtRepository<Fine> fineRepository; //other stuff } public interface DebtR

我有以下几点:

public class ClaimFacadeImpl implements ClaimFacade {

    @Autowired
    private DebtRepository<Claim> debtRepository;

    @Autowired
    private DebtRepository<Fine> fineRepository;

    //other stuff

}

public interface DebtRepository <T extends Debt> {
   //nothing special
}

public class DebtRepositoryImpl <T extends Debt> implements DebtRepository <T> {
   //nothing special
}
公共类ClaimFacadeImpl实现ClaimFacade{
@自动连线
私人债务库;
@自动连线
私人债务人;
//其他东西
}
公共接口存储库{
//没什么特别的
}
公共类DebtRepositoryImpl实现了DebtRepository{
//没什么特别的
}
2节课。一次索赔和一次罚款都延长了债务。 我得到的错误
不止一个字段的类型为interface domain.debt.DebtRepository


我该怎么办?

如果您还没有升级到Spring 4.0,请执行以下操作: