我正在尝试使用 Spring Boot 2 进行 Java 10 开发,但遇到了一些问题。
该应用程序是一个基于 Spring Boot 2 的简单 web 应用程序。应用程序启动正常,但是当我停止它时,我收到以下警告:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/Users/CS/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.11/tomcat-embed-core-9.0.11.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
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
如您所见,我已经将嵌入式 Tomcat 服务器从版本 8 切换到 9.0.11 以兼容 Java 模块系统。并且应用程序通过选项启动--add-opens java.base/java.lang=ALL-UNNAMED
有人知道我为什么收到这条消息吗?