dom4j 解析XML 非法反射 求大佬解决

Instinctchu 2019-02-04 02:22:20
//1:动态加载类 JDK 1.7
Class cls = Class.forName(className);
//2:动态创建对象
Object obj = cls.newInstance();
//3:动态查找service方法
Method method = cls.getDeclaredMethod("service",
HttpRequest.class,HttpResponse.class);
//System.out.println("method:"+method);

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.dom4j.io.SAXContentHandler (file:/C:/Users/liuchun/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.dom4j.io.SAXContentHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
...全文
199 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Instinctchu 2019-02-04
  • 打赏
  • 举报
回复
dom4j 1.6.1

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧