@@ -245,6 +245,12 @@ public class WebhookService {
|
||||
Exception lastException = null;
|
||||
for (int attempt = 0; attempt <= retryCount; attempt++) {
|
||||
try {
|
||||
if (attempt == 0) {
|
||||
// 배포 반영 확인용: HttpComponentsClientHttpRequestFactory 여야 SSL 우회 RestTemplate 사용 중.
|
||||
// SimpleClientHttpRequestFactory 로 찍히면 기본 new RestTemplate() 이 주입된 것 → PKIX 원인.
|
||||
log.info("[Webhook] POST 시도 - url: {}, requestFactory: {}", proxyUrl,
|
||||
restTemplate.getRequestFactory().getClass().getSimpleName());
|
||||
}
|
||||
if (attempt > 0) {
|
||||
long delayMs = (long) retryTime * attempt;
|
||||
log.info("[Webhook] 재시도 {}/{} - url: {}, delay: {}ms", attempt, retryCount, proxyUrl, delayMs);
|
||||
|
||||
@@ -13,6 +13,9 @@ import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class RestTemplateConfiguration {
|
||||
|
||||
@@ -36,6 +39,9 @@ public class RestTemplateConfiguration {
|
||||
.setMaxConnPerRoute(20)
|
||||
.build();
|
||||
|
||||
// 배포 반영 확인용: 이 줄이 기동 로그에 없으면 수정 전 클래스가 떠 있는 것.
|
||||
log.info("[RestTemplateConfiguration] httpClient 생성: SSL 인증서 체인/호스트명 검증 비활성화(TrustAllStrategy+NoopHostnameVerifier) 적용");
|
||||
|
||||
return httpClient;
|
||||
}
|
||||
|
||||
@@ -50,6 +56,7 @@ public class RestTemplateConfiguration {
|
||||
public RestTemplate restTemplate(HttpComponentsClientHttpRequestFactory factory) {
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
restTemplate.setRequestFactory(factory);
|
||||
log.info("[RestTemplateConfiguration] RestTemplate 빈 생성: requestFactory={}", factory.getClass().getSimpleName());
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user