动态调用接口中的方法

根据查询数据库A表中的字段method的值,动态匹配service中对应的方法

Method method = bussinessMethodService.getClass().getMethod(getMethod, new Class[]{HashMap.class});
datagram = (SoapDatagram) method.invoke(bussinessMethodService, paramMap);

 

原文地址:https://www.cnblogs.com/hoje/p/11737117.html