工程里面總是在報log4j的錯控制臺不打印sql語句?
很明顯,你的log4j沒有配置正確 給你個例子 #consoleLogissettobeaConsoleAppender. log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender log4j.appender.consoleLog.layout=org.apache.log4j.PatternLayout log4j.appender.consoleLog.layout.ConversionPattern=log類型,你自己定義拉