SprinfBoot报WARNING: An illegal reflective access operation has occurred

今天遇到了一个这样的警告:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/zhangxianwen/.m2/repository/org/springframework/spring-core/5.0.7.RELEASE/spring-core-5.0.7.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
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的版本弄错了:
SprinfBoot报WARNING: An illegal reflective access operation has occurred_第1张图片
把11改为1.8在运行就没问题了。

你可能感兴趣的:(个人笔记)