问题描述:

Struts2框架导入项目时使用了min版本下的jar,项目编写初期没有错误,加入文件上传下载后出现“ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath”

 

问题解决方案:

下载对应版本的jar并导入

然后需要在Src目录下创建配置文件log4j2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
        </Console>
    </Appenders>
    <Loggers>
        <Root level="info">
            <AppenderRef ref="Console"/>
        </Root>
    </Loggers>
</Configuration>

重启服务器后项目正常运行

 

原文链接:https://www.cnblogs.com/zjulanjian/p/10955285.html

相关文章:

  • 2021-04-20
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-04-30
  • 2022-12-23
  • 2021-06-18
  • 2021-05-15
  • 2021-10-02
相关资源
相似解决方案