java - Apache POI 发生了非法反射访问操作
问题描述
我正在使用 Apache POI 处理 excel 文件,从 Java 9 开始,我收到这条消息,根据这篇文章JDK9:发生了非法反射访问操作。org.python.core.PySystemState我们应该等待开发人员解决这个问题,但我应该把它留在我的新生产版本中吗?我认为如果我跳过警告应该不是问题。
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/T:/Workspace/Java/Sections%20Manager/libs/poi/poi-ooxml-3.17.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.DocumentHelper
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
解决方案
添加更新的“poi-ooxml”依赖项。它将解决上述所有警告。
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.0</version>
</dependency>
推荐阅读
- javascript - PHP if 语句触发 Confirm() 弹出窗口,无论选择如何都返回 true
- reactjs - 无法重定向到 Reactjs V16.xx 中的其他页面
- c# - 错误的命名空间生成xmlns c#
- javascript - 从数组数组中删除元素
- concurrency - 埃菲尔并发垃圾回收
- javascript - 先前路由的组件内的路由
- python - Python tkinter GUI 应用程序变得无响应
- python - dialogflow_v2 错误 503 已超过截止日期
- php - 扩展 strip_tags 以返回被剥离的标签列表
- cumulocity - smartREST 模板:自定义测量作为数据点不可见