Mybatis警告

在测试Mybatis的时候,出现了如下错误:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ibatis.reflection.Reflector (file:/D:/ruanjian/Maven/maven_repository/org/mybatis/mybatis/3.4.5/mybatis-3.4.5.jar) to method java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean)
WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.reflection.Reflector
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

根据字面上的翻译,和资料查阅,发现这是因为当前的Mybatis版本不支持jdk9及以上版本。
在这里插入图片描述
解决方法有两种!!

第一:使用jdk8及以下版本
第二:提高mybatis版本,我这里使用了3.5.3
在这里插入图片描述这样就已经解决了。

猜你喜欢

转载自blog.csdn.net/weixin_41058733/article/details/109146652