Try-with-resources are not supported at language level ‘5‘

Try-with-resources are not supported at language level ‘5‘,第1张

Try-with-resources are not supported at language level ‘5‘
今天用mybatis写项目的时候在测试的时候报错
在网上搜了搜原因,好像是mybatis在你编译没有设置的时候默认是5
要进行强转
在父项目中pom.xml中在中添加
解决方法

    
        org.apache.maven.plugins
        maven-compiler-plugin
        
            8
            8
        
    

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5706211.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存