log4j中Logger.getLogger()加载一个类提示错误


转载自:https://blog.csdn.net/q3229270/article/details/77986687 

-----------------------------

错误提示如下:The method getLogger(String) in the type Logger is not applicable for the arguments (Class<TestMyBatis>)

等我知道这个报错的原因时,觉得自己粗心。

因为import错了包

我导入的:import java.util.logging.Logger;

应该导入:import org.apache.log4j.Logger;

 

如上图,记下来以后别再犯这类的错误。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM