编译并运行我的应用程序后,我的控制台会显示以下错误,我不知道如何超越它们。
INFO: PWC1412: WebModule[null] ServletContext.log():Closing Spring root WebApplicationContext
SEVERE: log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
INFO: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''
SEVERE: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
SEVERE: log4j:WARN Please initialize the log4j system properly.
答案 0 :(得分:1)
看起来您还没有配置log4j记录器,在类路径中添加了log4j.properties文件。
基本的log4j.properties文件可以是
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=OFF, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n