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;



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


猜你喜欢

转载自blog.csdn.net/u011144776/article/details/80399440