mybatis-plus
mybatis-plus copied to clipboard
WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction
当前使用版本(必填,否则不予处理)
mybatis-plus-boot-starter: 3.4.3.4 JDK: zulu15.29.15-ca-jdk15.0.2-macosx_aarch64 MySQL: 8.0.22 SpringBoot: 2.3.7.RELEASE SpringCloud: Hoxton.SR9
该问题是如何引起的?(确定最新版也有问题再提!!!)
启动后首次执行 com.baomidou.mybatisplus.core.mapper.BaseMapper#selectOne 查询方法会有 WARNNING
重现步骤(如果有就写完整)
按上面的版本配置一个环境测试就可以
报错信息
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction (file:/Users/bastion/.m2/repository/com/baomidou/mybatis-plus-core/3.4.3.4/mybatis-plus-core-3.4.3.4.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
相关讨论见: https://github.com/baomidou/mybatis-plus/issues/3900 https://github.com/baomidou/mybatis-plus/pull/4031 但此PR至今未合并
最新的3.5.2依旧存在这个问题
This issue is still encountered in 3.5.2 with java 11. Any suggestion for the fix?