最初使用 sout,简单有效,但:
因此使用日志框架,这里引入 Log4J(网上教程多为老项目,先用着):
<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency>
Log4J 学习
原文:https://www.cnblogs.com/quanxi/p/log4j.html