碰到一个奇怪的问题,Spring在启动的时候得listener提示启动失败,打开log也没有任何信息,最后把log4j打开 :
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%p - %C{1}.%M(%L) | %m%n"/>
</layout>
</appender>
<logger name="org.apache">
<level value="WARN"/>
</logger>
<logger name="net.sf.hibernate">
<level value="WARN"/>
</logger>
<logger name="org.springframework">
<level value="DEBUG"/>
</logger>
<!--
<logger name="org.appfuse">
<level value="DEBUG"/>
</logger>
-->
<root>
<level value="DEBUG"/>
<appender-ref ref="CONSOLE"/>
</root>
</log4j:configuration>
提示说applicationContext.xml的编码有问题,最后改为UTF-8解决