2

I've got the following:

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
}

and 2 classes. One Claim and one Fine both extending Debt. I'm getting the error More than one field with type interface domain.debt.DebtRepository

what should I do?

ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
GregD
  • 1,884
  • 2
  • 28
  • 55

1 Answers1

4

Upgrade to Spring 4.0 if you have not done it already:

See http://spring.io/blog/2013/12/03/spring-framework-4-0-and-java-generics

J-16 SDiZ
  • 26,473
  • 4
  • 65
  • 84