log4j 的配置文件(log4j.properties)一定要在工程文件下的根目录下(src下)而不是文件系统的src下,否则系统找不到指定文件。将会报如下错误:
17:40:19,669 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
17:40:19,671 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) log4j:WARN Please initialize the log4j system properly.