当前使用版本(必填,否则不予处理)
Mybatis-Plus 3.4.1 JDK版本 jdk-11.0.7 SpringBoot 2.4.1
该问题是如何引起的?(确定最新版也有问题再提!!!)
调用 继承ServiceImpl的list()方法会抛出反射警告
重现步骤(如果有就写完整)
service方法继承ServiceImpl 然后在controller里面调用list()方法 目前在jdk11版本里面有
报错信息
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils (file:/C:/Users/yuyuko/.m2/repository/org/springframework/spring-core/5.3.2/spring-core-5.3.2.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 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
Comment From: qmdx
请使用版本 3.4.3.1 试试,旧版本不做维护
Comment From: nancheung
请使用版本
3.4.3.1试试,旧版本不做维护
@qmdx 这个和 #3613 是一样的,jdk9-15默认为警告,jdk16就会直接报错
Comment From: haytoo1
jdk11,mp3.4.3.1 有以下错误
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction (file:/C:/Users/too/.m2/repository/com/baomidou/mybatis-plus-core/3.4.3.1/mybatis-plus-core-3.4.3.1.jar) to field java.lang.invoke.SerializedLambda.capturingClass
WARNING: Please consider reporting this to the maintainers of com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction
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
Comment From: qmdx
jdk11,mp3.4.3.1 有以下错误
java WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction (file:/C:/Users/too/.m2/repository/com/baomidou/mybatis-plus-core/3.4.3.1/mybatis-plus-core-3.4.3.1.jar) to field java.lang.invoke.SerializedLambda.capturingClass WARNING: Please consider reporting this to the maintainers of com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction 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
这不是错误吧,只是警告
Comment From: haytoo1
jdk11,mp3.4.3.1 有以下错误
java WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction (file:/C:/Users/too/.m2/repository/com/baomidou/mybatis-plus-core/3.4.3.1/mybatis-plus-core-3.4.3.1.jar) to field java.lang.invoke.SerializedLambda.capturingClass WARNING: Please consider reporting this to the maintainers of com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction 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这不是错误吧,只是警告
抱歉,我的口误。
Comment From: wz-dazhi
这个issues关闭了. 这个警告是有解决方案了吗?
Comment From: liu-xinhui
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction (file:/E:/MavenRepository/com/baomidou/mybatis-plus-core/3.4.4.3-SNAPSHOT/mybatis-plus-core-3.4.4.3-20210616.071721-3.jar) to field java.lang.invoke.SerializedLambda.capturingClass
WARNING: Please consider reporting this to the maintainers of com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction
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
jdk8