Merge pull request '이미지 로그 찍기' (#25) from feature/cha into dev
Reviewed-on: #25
This commit is contained in:
commit
5a888f18e6
@ -73,10 +73,6 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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
|
||||
@Service
|
||||
@ -1501,18 +1497,6 @@ public class EstimateService {
|
||||
|
||||
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();
|
||||
@ -1520,6 +1504,11 @@ public class EstimateService {
|
||||
URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png");
|
||||
URLConnection con = url.openConnection();
|
||||
HttpURLConnection exitCode = (HttpURLConnection) con;
|
||||
|
||||
System.err.println("exitCode: " + exitCode);
|
||||
System.err.println("Exit code: " + exitCode.getResponseCode());
|
||||
|
||||
|
||||
if (exitCode.getResponseCode() == 200) {
|
||||
InputStream imageInputStream =
|
||||
new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user