httpclient使用commons-logging框架
而SpringBoot使用logback框架的时候,commons-logging会自动转移到logback
<!--使用logback--> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </dependency>
显示导入commons-logging,logback(spring-boot-starter-logging)
自动使用logback框架,默认级别INFO DEBUG<INFO
下面是我在StackOverFlow的回答,大家可以参考其他人的答案