转载:
https://www.cnblogs.com/puyangsky/p/7404945.html
maven依赖
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
关闭HttpClient4无用日志
resources 目录下 新建文件 logback.xml
logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="*" level="warn" />
</configuration>
运行后可以发现 无用日志没了,如下图