Java java지도 시간 스프링 부트 estClient 및 RestTemplate 로깅 http 요청 및 응답

스프링 부트 estClient 및 RestTemplate 로깅 http 요청 및 응답

Oct 26, 2024 am 06:16 AM

Spring boot estClient and RestTemplate logging http requests and response

Spring boot(SB) 2에서는 구성이 달랐지만 이제 SB3에서는 나머지 클라이언트를 다르게 구성해야 합니다. SB3 이전에는 RestTemplate이 있었고 이제는 봄 세계에 새로운 Rest API가 제공됩니다. 자세한 내용은 여기에서 확인하세요.

큰 차이점은 속성 구성이며 변경되었으며 스프링 사이트에 문서화되지 않았습니다

logging.level.org.apache.hc.client5.http.wire=DEBUG
logging.level.org.apache.hc.client5.http=DEBUG

로그인 후 복사

"wire"만 사용하면 요청/응답 덤프가 제공됩니다. 그리고 추가 http=DEBUG는 연결과 추가 디버그 로그를 제공합니다. 페이지 끝에서 찾아보세요.

@Bean
public RestClient getWebClient() {
    return RestClient.builder()
            .requestFactory(new HttpComponentsClientHttpRequestFactory())
            .build();
}

@Bean
public RestTemplate getRestTemplate() {
    RestTemplate restTemplate = new RestTemplate();
    restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
    return restTemplate;
}

로그인 후 복사

컨트롤러 측

@GetMapping(path = "/hello", produces = "application/json")
public String hello() {
    return client.get().uri("http://httpbin.org/get?test=2")
            .retrieve().body(String.class);
}

@GetMapping(path = "/hello2", produces = "application/json")
public String hello2() {
    return restTemplate.getForObject("http://httpbin.org/get?test=1", String.class);
}

로그인 후 복사

디버그 로그

C:\Users\ozkan\.jdks\openjdk-21.0.2\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Users\ozkan\AppData\Local\Programs\IntelliJ IDEA Ultimate\lib\idea_rt.jar=49346:C:\Users\ozkan\AppData\Local\Programs\IntelliJ IDEA Ultimate\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath C:\Users\ozkan\projects\HttpDebugLogging\build\classes\java\main;C:\Users\ozkan\projects\HttpDebugLogging\build\resources\main;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web.2.54d75553c6af42122d4db645f4924a95084e382\spring-boot-starter-web-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.client5\httpclient5.3.1b53c8f4bcdaada801d311cf2ff8a24d6d96883\httpclient5-5.3.1.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json.2.5df311af4c242eb95c3526f48ab4f31c384a247e\spring-boot-starter-json-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter.2.5\a9837a876129cc6fe5f3abf1de5ec0a16faaf003\spring-boot-starter-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat.2.5\a40ebfa6becb35b419b37e49e33b2822e22cf42a\spring-boot-starter-tomcat-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc.1.6\ef1f76db6d94bac428839cb91fa59235c8356e56\spring-webmvc-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web.1.6a32e3497fe39550da3b280bda5d9933ae2d51d\spring-web-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5-h2.2.472764df7b4857549e2880dd32a6f9009166289\httpcore5-h2-5.2.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5.2.4d8332b975f9e9a8298efe4c883ec43d45b7059\httpcore5-5.2.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api.0.13229737f704b121a318bba5d5deacbcf395bc77\slf4j-api-2.0.13.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310.15.4de629770a4559db57128d35ccae7d2fddd35db3\jackson-datatype-jsr310-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names.15.4\e654497a08359db2521b69b5f710e00836915d8c\jackson-module-parameter-names-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8.15.44777f182334a21bf1aeab1b04cc4398c801f3f\jackson-datatype-jdk8-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind.15.40309fc381f77d4d15c4a4cdaa0db5025c4fd13\jackson-databind-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging.2.5cf3a346da7bb624381ccc21d7a27500181de63\spring-boot-starter-logging-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure.2.585a2c00a03edb896b2833e4bdee2ae53cd69b8\spring-boot-autoconfigure-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot.2.5\eec72431f6f56a50c9919129665ba3359ca02104\spring-boot-3.2.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api.1.1b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core.1.6\dea4b8e110b7b54a02a4907e32dbb0adee8a7168\spring-core-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml.2af797a25458550a16bf89acc8e4ab2b7f2bfce0\snakeyaml-2.2.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket.1.20502adffaf9e6e4bc2b63a557e348d7f6c0faf7\tomcat-embed-websocket-10.1.20.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core.1.20\ba0dc784e12086f83d8e1d5a10443b166abf5780\tomcat-embed-core-10.1.20.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el.1.20\cc1a42b8228699e92c8eba0187eccf54bf892802\tomcat-embed-el-10.1.20.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context.1.6be30298638975efaf7fff22f1570d79b2679814\spring-context-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop.1.658f52cb9fcb3adf7e836304550de5431a9347e\spring-aop-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans.1.62d80ff134420db4ebf7614758e6a02a9bd3c41\spring-beans-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression.1.6c3d7f0e17a919a4ea9f087e4e2140ad39776bc8\spring-expression-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation.12.5\ee23704259a1aad5c8f503db4d37cdfe5352e766\micrometer-observation-1.12.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations.15.423ea5a9bf52cdc9c5e537a0e52f2432eaf208b\jackson-annotations-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core.15.4\aebe84b45360debad94f692a4074c6aceb535fa0\jackson-core-2.15.4.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic.4.14\d98bc162275134cdf1518774da4a2a17ef6fb94d\logback-classic-1.4.14.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j.21.1\d77b2ba81711ed596cd797cc2b5b5bd7409d841c\log4j-to-slf4j-2.21.1.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j.0.13\a3bcd9d9dd50c71ce69f06b1fd05e40fdeff6ba5\jul-to-slf4j-2.0.13.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl.1.6cb19b30b22feca73c2ac005ca849c5890935a3\spring-jcl-6.1.6.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons.12.5\da45afd81a6a05267df5ddfe10438ea857e0f7d9\micrometer-commons-1.12.5.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core.4.14d3c2248219ac0effeb380ed4c5280a80bf395e8\logback-core-1.4.14.jar;C:\Users\ozkan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api.21.1c65e87b9ce1694a01524e192d7be989ba70486\log4j-api-2.21.1.jar io.github.ozkanpakdil.cloudtest.CloudTestApplication

  . _______ _ _
 /\ / ___'___ _ _(_)_ ____ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \/ ___)| |_)| | | | | || (_| | ) ) ) )
  ' | ____| .__ |_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot :: (v3.2.5)

INFO io.github.ozkanpakdil.cloudtest.CloudTestApplication - Starting CloudTestApplication using Java 21.0.2 with PID 16624 (C:\Users\ozkan\projects\HttpDebugLogging\build\classes\java\main started by ozkan in C:\Users\ozkan\projects\HttpDebugLogging)
INFO io.github.ozkanpakdil.cloudtest.CloudTestApplication - No active profile set, falling back to 1 default profile: "default"
INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.20]
INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 2800 ms
INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
INFO io.github.ozkanpakdil.cloudtest.CloudTestApplication - Started CloudTestApplication in 5.901 seconds (process running for 8.934)
INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 1 ms
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000001 preparing request execution
DEBUG org.apache.hc.client5.http.impl.classic.ProtocolExec - ex-0000000001 target auth state: UNCHALLENGED
DEBUG org.apache.hc.client5.http.impl.classic.ProtocolExec - ex-0000000001 proxy auth state: UNCHALLENGED
DEBUG org.apache.hc.client5.http.impl.classic.ConnectExec - ex-0000000001 acquiring connection with route {}->http://httpbin.org:80
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000001 acquiring endpoint (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000001 endpoint lease request (3 MINUTES) [route: {}->http://httpbin.org:80][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25]
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000001 endpoint leased [route: {}->http://httpbin.org:80][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25]
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000001 acquired ep-0000000001
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000001 acquired endpoint ep-0000000001
DEBUG org.apache.hc.client5.http.impl.classic.ConnectExec - ex-0000000001 opening connection {}->http://httpbin.org:80
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000001 connecting endpoint (null)
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 connecting endpoint to http://httpbin.org:80 (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org resolving remote address
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org resolved to [httpbin.org/34.198.16.126, httpbin.org/52.206.26.65, httpbin.org/18.208.239.112, httpbin.org/3.233.6.75]
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org:80 connecting null->httpbin.org/34.198.16.126:80 (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnection - http-outgoing-0 set socket timeout to 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org:80 connected null->httpbin.org/34.198.16.126:80 as http-outgoing-0
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 connected http-outgoing-0
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000001 endpoint connected
DEBUG org.apache.hc.client5.http.impl.classic.MainClientExec - ex-0000000001 executing GET /get?test=2 HTTP/1.1
DEBUG org.apache.hc.client5.http.protocol.RequestAddCookies - ex-0000000001 Cookie spec selected: strict
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000001 start execution ex-0000000001
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 executing exchange ex-0000000001 over http-outgoing-0
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 >> GET /get?test=2 HTTP/1.1
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 >> Accept-Encoding: gzip, x-gzip, deflate
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 >> Host: httpbin.org
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 >> Connection: keep-alive
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/5.3.1 (Java/21.0.2)
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "GET /get?test=2 HTTP/1.1[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip, x-gzip, deflate[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "Host: httpbin.org[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "Connection: keep-alive[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/5.3.1 (Java/21.0.2)[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 >> "[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Date: Sat, 18 May 2024 19:01:33 GMT[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Content-Type: application/json[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Content-Length: 332[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Connection: keep-alive[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Server: gunicorn/19.9.0[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Access-Control-Allow-Origin: *[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "Access-Control-Allow-Credentials: true[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "{[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "args": {[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "test": "2"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " }, [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "headers": {[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "Accept-Encoding": "gzip, x-gzip, deflate", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "Host": "httpbin.org", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "User-Agent": "Apache-HttpClient/5.3.1 (Java/21.0.2)", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "X-Amzn-Trace-Id": "Root=1-6648fb0d-38aeda533a97acd53fdb1f56"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " }, [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "origin": "82.12.84.124", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << " "url": "http://httpbin.org/get?test=2"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-0 << "}[\n]"
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << HTTP/1.1 200 OK
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Date: Sat, 18 May 2024 19:01:33 GMT
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Content-Type: application/json
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Content-Length: 332
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Connection: keep-alive
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Server: gunicorn/19.9.0
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Access-Control-Allow-Origin: *
DEBUG org.apache.hc.client5.http.headers - http-outgoing-0 << Access-Control-Allow-Credentials: true
DEBUG org.apache.hc.client5.http.impl.classic.MainClientExec - ex-0000000001 connection can be kept alive for 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000001 releasing valid endpoint
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 releasing endpoint
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 connection http-outgoing-0 can be kept alive for 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000001 connection released [route: {}->http://httpbin.org:80][total available: 1; route allocated: 1 of 5; total allocated: 1 of 25]
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000002 preparing request execution
DEBUG org.apache.hc.client5.http.impl.classic.ProtocolExec - ex-0000000002 target auth state: UNCHALLENGED
DEBUG org.apache.hc.client5.http.impl.classic.ProtocolExec - ex-0000000002 proxy auth state: UNCHALLENGED
DEBUG org.apache.hc.client5.http.impl.classic.ConnectExec - ex-0000000002 acquiring connection with route {}->http://httpbin.org:80
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000002 acquiring endpoint (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000002 endpoint lease request (3 MINUTES) [route: {}->http://httpbin.org:80][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25]
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000002 endpoint leased [route: {}->http://httpbin.org:80][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25]
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ex-0000000002 acquired ep-0000000002
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ex-0000000002 acquired endpoint ep-0000000002
DEBUG org.apache.hc.client5.http.impl.classic.ConnectExec - ex-0000000002 opening connection {}->http://httpbin.org:80
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000002 connecting endpoint (null)
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 connecting endpoint to http://httpbin.org:80 (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org resolving remote address
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org resolved to [httpbin.org/34.198.16.126, httpbin.org/52.206.26.65, httpbin.org/18.208.239.112, httpbin.org/3.233.6.75]
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org:80 connecting null->httpbin.org/34.198.16.126:80 (3 MINUTES)
DEBUG org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnection - http-outgoing-1 set socket timeout to 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator - httpbin.org:80 connected null->httpbin.org/34.198.16.126:80 as http-outgoing-1
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 connected http-outgoing-1
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000002 endpoint connected
DEBUG org.apache.hc.client5.http.impl.classic.MainClientExec - ex-0000000002 executing GET /get?test=1 HTTP/1.1
DEBUG org.apache.hc.client5.http.protocol.RequestAddCookies - ex-0000000002 Cookie spec selected: strict
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000002 start execution ex-0000000002
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 executing exchange ex-0000000002 over http-outgoing-1
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> GET /get?test=1 HTTP/1.1
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> Accept: text/plain, application/json, application/*+json, */*
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> Accept-Encoding: gzip, x-gzip, deflate
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> Host: httpbin.org
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> Connection: keep-alive
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 >> User-Agent: Apache-HttpClient/5.3.1 (Java/21.0.2)
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "GET /get?test=1 HTTP/1.1[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "Accept-Encoding: gzip, x-gzip, deflate[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "Host: httpbin.org[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "Connection: keep-alive[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "User-Agent: Apache-HttpClient/5.3.1 (Java/21.0.2)[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 >> "[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Date: Sat, 18 May 2024 19:01:37 GMT[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Content-Type: application/json[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Content-Length: 404[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Connection: keep-alive[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Server: gunicorn/19.9.0[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Access-Control-Allow-Origin: *[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "Access-Control-Allow-Credentials: true[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "[\r][\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "{[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "args": {[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "test": "1"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " }, [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "headers": {[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "Accept": "text/plain, application/json, application/*+json, */*", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "Accept-Encoding": "gzip, x-gzip, deflate", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "Host": "httpbin.org", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "User-Agent": "Apache-HttpClient/5.3.1 (Java/21.0.2)", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "X-Amzn-Trace-Id": "Root=1-6648fb11-4bc979503c1426712721796a"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " }, [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "origin": "82.12.84.124", [\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << " "url": "http://httpbin.org/get?test=1"[\n]"
DEBUG org.apache.hc.client5.http.wire - http-outgoing-1 << "}[\n]"
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << HTTP/1.1 200 OK
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Date: Sat, 18 May 2024 19:01:37 GMT
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Content-Type: application/json
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Content-Length: 404
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Connection: keep-alive
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Server: gunicorn/19.9.0
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Access-Control-Allow-Origin: *
DEBUG org.apache.hc.client5.http.headers - http-outgoing-1 << Access-Control-Allow-Credentials: true
DEBUG org.apache.hc.client5.http.impl.classic.MainClientExec - ex-0000000002 connection can be kept alive for 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.classic.InternalHttpClient - ep-0000000002 releasing valid endpoint
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 releasing endpoint
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 connection http-outgoing-1 can be kept alive for 3 MINUTES
DEBUG org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager - ep-0000000002 connection released [route: {}->http://httpbin.org:80][total available: 1; route allocated: 1 of 5; total allocated: 1 of 25]

로그인 후 복사

여기에서 전체 작업 예제를 찾아보세요

위 내용은 스프링 부트 estClient 및 RestTemplate 로깅 http 요청 및 응답의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Nordhold : Fusion System, 설명
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

회사의 보안 소프트웨어가 응용 프로그램이 실행되지 않습니까? 문제 해결 및 해결 방법은 무엇입니까? 회사의 보안 소프트웨어가 응용 프로그램이 실행되지 않습니까? 문제 해결 및 해결 방법은 무엇입니까? Apr 19, 2025 pm 04:51 PM

일부 애플리케이션이 제대로 작동하지 않는 회사의 보안 소프트웨어에 대한 문제 해결 및 솔루션. 많은 회사들이 내부 네트워크 보안을 보장하기 위해 보안 소프트웨어를 배포 할 것입니다. ...

분류를 구현하고 그룹의 일관성을 유지하기 위해 이름을 숫자로 변환하려면 어떻게합니까? 분류를 구현하고 그룹의 일관성을 유지하기 위해 이름을 숫자로 변환하려면 어떻게합니까? Apr 19, 2025 pm 11:30 PM

많은 응용 프로그램 시나리오에서 정렬을 구현하기 위해 이름으로 이름을 변환하는 솔루션, 사용자는 그룹으로, 특히 하나로 분류해야 할 수도 있습니다.

맵 구조를 사용하여 시스템 도킹에서 필드 매핑 문제를 단순화하는 방법은 무엇입니까? 맵 구조를 사용하여 시스템 도킹에서 필드 매핑 문제를 단순화하는 방법은 무엇입니까? Apr 19, 2025 pm 06:21 PM

시스템 도킹의 필드 매핑 처리 시스템 도킹을 수행 할 때 어려운 문제가 발생합니다. 시스템의 인터페이스 필드를 효과적으로 매핑하는 방법 ...

Intellij Idea는 로그를 출력하지 않고 스프링 부팅 프로젝트의 포트 번호를 어떻게 식별합니까? Intellij Idea는 로그를 출력하지 않고 스프링 부팅 프로젝트의 포트 번호를 어떻게 식별합니까? Apr 19, 2025 pm 11:45 PM

IntellijideAultimate 버전을 사용하여 봄을 시작하십시오 ...

데이터베이스 쿼리 조건을 구축하기 위해 엔티티 클래스 변수 이름을 우아하게 얻는 방법은 무엇입니까? 데이터베이스 쿼리 조건을 구축하기 위해 엔티티 클래스 변수 이름을 우아하게 얻는 방법은 무엇입니까? Apr 19, 2025 pm 11:42 PM

데이터베이스 작업에 MyBatis-Plus 또는 기타 ORM 프레임 워크를 사용하는 경우 엔티티 클래스의 속성 이름을 기반으로 쿼리 조건을 구성해야합니다. 매번 수동으로 ...

Java 객체를 어레이로 안전하게 변환하는 방법은 무엇입니까? Java 객체를 어레이로 안전하게 변환하는 방법은 무엇입니까? Apr 19, 2025 pm 11:33 PM

Java 객체 및 배열의 ​​변환 : 캐스트 유형 변환의 위험과 올바른 방법에 대한 심층적 인 논의 많은 Java 초보자가 객체를 배열로 변환 할 것입니다 ...

Redis 캐시 솔루션을 사용하여 제품 순위 목록의 요구 사항을 효율적으로 실현하는 방법은 무엇입니까? Redis 캐시 솔루션을 사용하여 제품 순위 목록의 요구 사항을 효율적으로 실현하는 방법은 무엇입니까? Apr 19, 2025 pm 11:36 PM

Redis 캐싱 솔루션은 제품 순위 목록의 요구 사항을 어떻게 인식합니까? 개발 과정에서 우리는 종종 a ... 표시와 같은 순위의 요구 사항을 처리해야합니다.

전자 상거래 플랫폼 SKU 및 SPU 데이터베이스 설계 : 사용자 정의 속성과 귀속없는 제품을 모두 고려하는 방법은 무엇입니까? 전자 상거래 플랫폼 SKU 및 SPU 데이터베이스 설계 : 사용자 정의 속성과 귀속없는 제품을 모두 고려하는 방법은 무엇입니까? Apr 19, 2025 pm 11:27 PM

전자 상거래 플랫폼에서 SKU 및 SPU 테이블의 디자인에 대한 자세한 설명이 기사는 전자 상거래 플랫폼에서 SKU 및 SPU의 데이터베이스 설계 문제, 특히 사용자 정의 판매를 처리하는 방법에 대해 논의 할 것입니다 ...

See all articles