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;

 

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

posted on 2019-02-25 17:58  frank_cui  阅读(2018)  评论(0)    收藏  举报

导航

levels of contents