struts2+Hibernate+spring项目发布到tomcat后,tomcat启动报错。
struts2+Hibernate+spring项目发布到tomcat后,tomcat启动报错,信息:Thelistener"org.springframework.we...
struts2+Hibernate+spring项目发布到tomcat后,tomcat启动报错,
信息: The listener "org.springframework.web.context.ContextLoaderListener" is al
ready configured for this context. The duplicate definition has been ignored.
log4j:WARN No appenders could be found for logger (org.springframework.util.Clas
sUtils). 展开
信息: The listener "org.springframework.web.context.ContextLoaderListener" is al
ready configured for this context. The duplicate definition has been ignored.
log4j:WARN No appenders could be found for logger (org.springframework.util.Clas
sUtils). 展开
展开全部
新建一个log4j.properties文件,加入到classpath里面。内容如下:
log4j.rootLogger=debug,appender1
log4j.logger.org.hibernate=INFO
log4j.logger.com.flysnow=DEBUG
log4j.logger.org.apache=INFO
log4j.logger.org.springframework=INFO
log4j.appender.appender1=org.apache.log4j.ConsoleAppender
log4j.appender.appender1=org.apache.log4j.ConsoleAppender
log4j.appender.appender1.layout=org.apache.log4j.PatternLayout
log4j.appender.appender1.layout.ConversionPattern=(%-50c{1} %L\u884c) %m%n
当然你也可以自己配置
log4j.rootLogger=debug,appender1
log4j.logger.org.hibernate=INFO
log4j.logger.com.flysnow=DEBUG
log4j.logger.org.apache=INFO
log4j.logger.org.springframework=INFO
log4j.appender.appender1=org.apache.log4j.ConsoleAppender
log4j.appender.appender1=org.apache.log4j.ConsoleAppender
log4j.appender.appender1.layout=org.apache.log4j.PatternLayout
log4j.appender.appender1.layout.ConversionPattern=(%-50c{1} %L\u884c) %m%n
当然你也可以自己配置
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询