@Autowired private ApplicationContext applicationContext; String softPath =
"本地|远程/jar包.jar"; URLClassLoader classLoader = new URLClassLoader(new URL[]{new
URL(softPath)}, Thread.currentThread().getContextClassLoader()); Class aClass=
classLoader.loadClass("完整的接口地址(xxx.xxx.xxx.Ixxx)"); ReferenceBean referenceBean
= new ReferenceBean(); referenceBean.setApplicationContext(applicationContext);
referenceBean.setInterface(aClass); referenceBean.setUrl(url);
referenceBean.afterPropertiesSet(); Object out= referenceBean.get();
System.out.println(JSON.toJSONString(out));
 

技术
©2019-2020 Toolsou All rights reserved,
MySQL触发器【linux】shell:简单的shell脚本练习java连接数据库实现基本的增删改查Windows网络服务渗透测试实战-跨网段攻击JavaScript百炼成仙 1.15 天秀idea运行Mybatis项目出现的常见错误(编码错误等)Java实现自动猜数(猜数游戏进阶版)VHDL——4位移位寄存器【微信小程序学习】网易云音乐歌曲详情页代码实现一份笔记让你从 15K 涨薪并跳槽到32K+16