WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/F:/.m2/localrepository/maven_repository/org/springframework/spring-core/5.1.6.RELEASE/spring-core-5.1.6.RELEASE.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
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
jdk版本为9,
spring-instrument版本如下:
org.springframework
spring-instrument
5.1.6.RELEASE
在学习spring的@EnableLoadTimeWeaving注解时,出现上述警告,并且方法得不到增强。
搜索结果为jdk版本过高,超过8之后的版本对反射也进行了约束。
请问只能通过降低jdk版本解决问题嘛?
该警告是因为jdk版本太高