1
  public interface test{
  void do();
 }

public Class testImp
 {
   @Autowired
   ApplicationContext appContext;

public T getBeanWithType(T type){

 @Override    
 public T T getRepository(T type) {

    return (T) appContext.getBean(type);    
 }

pulic void getType(T type){

return  getBeanWithType(test.Class)
  }
}
Abdelhak
  • 8,299
  • 4
  • 22
  • 36
Ali Lotfi
  • 7
  • 4

0 Answers0