I have a class who extends an abstract class. In this abstract class, I have a method named findAll.
Class<?> clazz = Class.forName("com.zirca.service.CarTypesServiceImpl");
Object springService = appContext.getBean(clazz);clazz.getMethods()
Method m = clazz.getDeclaredMethod("findAll");
Object o = m.invoke(springService);
on getDeclaredMethod, I get this error
java.lang.NoSuchMethodException: com.zirca.service.CarTypesServiceImpl.findAll()
When I do
clazz.getMethods()
I see my findAll method
Any idea?
Aucun commentaire:
Enregistrer un commentaire