Compare commits
No commits in common. "5a888f18e67e7888b35bd8d5f7d988cc0624bbd3" and "7832f9fee4dd3c08a839f28c7e4c937cd52db604" have entirely different histories.
5a888f18e6
...
7832f9fee4
@ -73,6 +73,10 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@ -1497,6 +1501,18 @@ public class EstimateService {
|
|||||||
|
|
||||||
estimateResponse.setPwrGnrSim(pwrGnrSimResponse);
|
estimateResponse.setPwrGnrSim(pwrGnrSimResponse);
|
||||||
|
|
||||||
|
//SSL 무시하기
|
||||||
|
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {return null;}
|
||||||
|
public void checkClientTrusted(X509Certificate[] certs, String authType) {}
|
||||||
|
public void checkServerTrusted(X509Certificate[] certs, String authType) {}
|
||||||
|
} };
|
||||||
|
|
||||||
|
SSLContext sc = SSLContext.getInstance("SSL");
|
||||||
|
sc.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||||
|
HttpsURLConnection
|
||||||
|
.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||||
|
//end
|
||||||
|
|
||||||
// 도면 이미지 셋팅
|
// 도면 이미지 셋팅
|
||||||
String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo();
|
String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo();
|
||||||
@ -1504,11 +1520,6 @@ public class EstimateService {
|
|||||||
URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png");
|
URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png");
|
||||||
URLConnection con = url.openConnection();
|
URLConnection con = url.openConnection();
|
||||||
HttpURLConnection exitCode = (HttpURLConnection) con;
|
HttpURLConnection exitCode = (HttpURLConnection) con;
|
||||||
|
|
||||||
System.err.println("exitCode: " + exitCode);
|
|
||||||
System.err.println("Exit code: " + exitCode.getResponseCode());
|
|
||||||
|
|
||||||
|
|
||||||
if (exitCode.getResponseCode() == 200) {
|
if (exitCode.getResponseCode() == 200) {
|
||||||
InputStream imageInputStream =
|
InputStream imageInputStream =
|
||||||
new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream();
|
new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user