非法反射 An illegal reflective access operation has occurred

在使用Spring框架时遇到了一个非法反射警告,警告指出由org.springframework.cglib.core包中的ReflectUtils1类尝试访问了ClassLoader的defineClass方法。尽管警告提示考虑报告给维护者,并且使用-jdk参数-illegal-access=warn可以启用更多警告,但似乎不影响程序的运行。问题可能与使用的JDK版本10有关,降级到更低版本可以解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils1(file:/D:/Code/maven/repertory/org/springframework/springcore/5.0.6.RELEASE/springcore5.0.6.RELEASE.jar)tomethodjava.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)WARNING:Pleaseconsiderreportingthistothemaintainersoforg.springframework.cglib.core.ReflectUtils1(file:/D:/Code/maven/repertory/org/springframework/spring−core/5.0.6.RELEASE/spring−core−5.0.6.RELEASE.jar)tomethodjava.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)WARNING:Pleaseconsiderreportingthistothemaintainersoforg.springframework.cglib.core.ReflectUtils1
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

据说是因为版本的问题然后有问题?
我是用的jdk10,用回之前的版本好像就可以了,但是这个错好像不影响运行?

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值