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的版本弄错了:
在这里插入图片描述
把11改为1.8在运行就没问题了。

发布了31 篇原创文章 · 获赞 13 · 访问量 7941

猜你喜欢

转载自blog.csdn.net/weixin_42322648/article/details/102804556
今日推荐