在OpenJDK 64位服务器VM AdoptOpenJDK(内部版本11.0.2 + 9,混合模式)中使用2.1.2.RELEASE时,在应用程序启动期间会打印以下警告,根据关闭的Spring问题,我不希望这样做 #22032。这是另一个问题吗?我自己可以做些什么来解决此问题吗? 2.1.2.RELEASE使用spring-framework.version 5.1.4.RELEASE。问题#22032似乎已经添加到5.1.3里程碑中。
2019-02-04 14:52:39.534 DEBUG 4856 --- [ restartedMain] o.s.aop.framework.CglibAopProxy : Method [void java.io.OutputStreamWriter.flushBuffer() throws java.io.IOException] is package-visible across different ClassLoaders and cannot get proxied via CGLIB: Declare this method as public or protected if you need to support invocations through the proxy.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access using Lookup on org.springframework.cglib.core.ReflectUtils (file:/C:/Users/myself/.m2/repository/org/springframework/spring-core/5.1.4.RELEASE/spring-core-5.1.4.RELEASE.jar) to class java.io.OutputStreamWriter
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils
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
设置为“ --illegal-access = warn”时,将在应用程序启动过程中打印以下内容。
2019-02-04 15:02:06.471 DEBUG 6804 --- [ restartedMain] o.s.aop.framework.CglibAopProxy : Method [void java.io.OutputStreamWriter.flushBuffer() throws java.io.IOException] is package-visible across different ClassLoaders and cannot get proxied via CGLIB: Declare this method as public or protected if you need to support invocations through the proxy.
WARNING: Illegal reflective access using Lookup on org.springframework.cglib.core.ReflectUtils (file:/C:/Users/myself/.m2/repository/org/springframework/spring-core/5.1.4.RELEASE/spring-core-5.1.4.RELEASE.jar) to class java.io.OutputStreamWriter
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils (file:/C:/Users/myself/.m2/repository/org/springframework/spring-core/5.1.4.RELEASE/spring-core-5.1.4.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
2019-02-04 15:02:06.484 DEBUG 6804 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'byteArrayStreamInDokumentinhalt'
WARNING: Illegal reflective access using Lookup on org.springframework.cglib.core.ReflectUtils (file:/C:/Users/myself/.m2/repository/org/springframework/spring-core/5.1.4.RELEASE/spring-core-5.1.4.RELEASE.jar) to class java.io.ByteArrayOutputStream