server2021. 8. 18. 17:50

 

[github]8월 13일 id , password 불가 이슈 해결방법

ec2에서 ubuntu로 사용중인데..

 

git pull 땡기고 https로 id , password 입력해서 진행 했었다..

 

그런데 8월 13일부터 막는단다???

 

accesstoken사용하라는데??

 

ssh생성해서 사용 하는 방식으로 바꿔야 한다..

 

밑의 참조처럼 하면 되는데

 

1. sshkey 생성한다..

ssh-keygen -t rsa -C "{your-github-email}"

엔터 3번 

 

2. ssh-rsa 부터 복사해둔다..

cat ~/.ssh/id_rsa.pub

 

3. github 사이트 들어가서 ssh 등록 시켜주면 ssh방식으로 clone , pull 받을 수 있다.

 

 

 

[참조] https://dongza.tistory.com/15 

 

[AWS] git push origin master 후 Permission denied 에러 해결 방법

aws에서 새로운 인스턴스를 만들고 git을 연동하다 보면 꼭 마주치는 에러다. [ec2-user@doolda]$ git push origin master Permission denied (publickey). fatal: Could not read from remote repository. Please..

dongza.tistory.com

 

Posted by thdeodls85
server2021. 5. 24. 17:40

월별 집계방법

 

월별로 group by 해볼 수 있다.

 

SELECT DATE_FORMAT(regdate,'%Y-%m') m, COUNT(*) FROM table_name GROUP BY m;

Posted by thdeodls85
server2021. 3. 29. 11:05

 

[spring boot]mac update 이후에 failed to create the java virtual machine 해결방법

 

업데이트 이후에, springboot 실행 시키니 오류가 났다.

 

터미널에서  -> java -version 치면

 

java version "1.8.0_241"

 

이렇게 나오면 

 

finder -> 응용프로그램 -> springToolSuite4 -> 패키지 내용보기 -> contents -> info.plist

 

jdk1.8.0_241.jdk 실행파일명을 똑같이 해주면 된다. 

 

[참조] velog.io/@yujina25/MAC-Bic-Sur-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8-%ED%9B%84-%EC%9D%B4%ED%81%B4%EB%A6%BD%EC%8A%A4Eclipse-%EC%98%A4%EB%A5%98

 

[MAC] Bic Sur 업데이트 후 이클립스(Eclipse) 오류

Bic Sur 업데이트 후 이클립스를 실행하니 오류가 뜬다.Failed to create the Java Virtual Machine서치를 해보니 JDK 버전이 잘못되어 있어서 삭제 후 새로운 버전으로 다시 깔아야 한다는 해결책이 있었다.

velog.io

 

Posted by thdeodls85
server2021. 2. 15. 17:51

[spring boot]Zero date value prohibited 해결방법

 

날짜 넣는곳에 null이거나 형식에 맞지 않으면 안된다는 것이다.

 

형식만 맞춰주면 오케~

Posted by thdeodls85
server2021. 2. 15. 13:34

[spring boot]아임포트 본인인증 origin 문제있는 경험

 

데이터를 받아오다 보니.. origin 이 내가 보낸 url인데... 

 

화면을 띠울 때 회사의 primary key 를 origin에 담아서 보내서 그 데인터를 가지고 우리 서버의 데이터와 연동 시킬려고 했는데..

 

origin이 않나온다.. 가이드 상이나 api상에는 나오지만 ... release build 에 업데이트를 안한것이다..

 

그래서 연락해서 본인인증 내역 조회 API 응답에 origin 추가 0.2.14 버젼에 업데이트 할 수 있게 되었다.

 

사람이 하는거기 때문에 다를 수 있다는걸 알고 하나하나 확인 해봐야 한다. 

Posted by thdeodls85
server2021. 2. 15. 13:31

[spring boot]아임포트 본인인증 certification 정보 받아오기

 

인증까지 완료되니.. 이제 imp_uid 가지고 정보를 가지고 올 수 있다..

 

IamportClient client = new IamportClient(imp_key, imp_secret);

IamportResponse<Certification> certificationResponse = client.certificationByImpUid(impUid);

 

System.out.println("getMessage ->" + certificationResponse.getMessage());

System.out.println("getResponse ->" + certificationResponse.getResponse());

 

System.out.println("getBirth ->" + certificationResponse.getResponse().getBirth().toString());

System.out.println("getGender ->" + certificationResponse.getResponse().getGender());

System.out.println("getName ->" + certificationResponse.getResponse().getName());

System.out.println("getPgProvider ->" + certificationResponse.getResponse().getPgProvider());

System.out.println("getImpUid ->" + certificationResponse.getResponse().getImpUid().toString());

System.out.println("getMerchantUid ->" + certificationResponse.getResponse().getMerchantUid().toString());

System.out.println("getPgTid ->" + certificationResponse.getResponse().getPgTid().toString());

System.out.println("getUniqueKey ->" + certificationResponse.getResponse().getUniqueKey().toString());

System.out.println("getUniqueInSite ->" + certificationResponse.getResponse().getUniqueInSite().toString());

System.out.println("getOrigin ->" + certificationResponse.getResponse().getOrigin().toString());

System.out.println("getCarrier ->" + certificationResponse.getResponse().getCarrier().toString());

System.out.println("getPhone ->" + certificationResponse.getResponse().getPhone().toString());

Posted by thdeodls85
server2021. 2. 15. 11:58

[spring boot]아임포트 본인인증 인증토큰 받아오기

 

rsp 데이터가 넘어오고 나면, spring boot 에서 아임포트 api를 타서 토큰을 받아와야 한다.

 

imp_uid는 서버에서 넘어 왔어왓고,

 

spring boot에 아임포트 라이브러리를 다운받는다.

 

<dependency>

    <groupId>commons-codec</groupId>

    <artifactId>commons-codec</artifactId>

    <version>1.15</version>

</dependency>

 

<!-- iamport -->

<dependency>

    <groupId>com.github.iamport</groupId>

    <artifactId>iamport-rest-client-java</artifactId>

    <version>0.2.14</version>

</dependency>

 

자 이렇게 하면 아임포트 클래스를 확인 할 수 있는데

 

String imp_key = "ㅂㅇㅂㅇㅂㅇㅂㅇ";

String imp_secret = "ㅂㅇㅂㅇㅂㅈㅇㅂㅈㅇ";

 

웹상에 나와있는 key, secret 등록하고 

 

 IamportClient client = new IamportClient(imp_key, imp_secret);

 

하면 자동인증이 된거기 때문에 

 

아임포트 가이드에서 처럼 '인증정보 조회하기' 처럼 할 필요가 없다.

Posted by thdeodls85
server2021. 2. 15. 11:16

[spring boot]아임포트 본인인증 rsp.imp_uid받는방법

 

아임포트 가이드 보면 nodejs로 설명이 되있다.. 

 

spring boot로는 설명이 없어서 답답하다..... 가이드가 더 세심하게 만들 필요가 있다고 본다..  

 

웹에서 

 

if ( rsp.success ) {

    /* alert("->>>>rsp.imp_uid -> " + rsp.imp_uid + ", rsp.merchant_uid ->" + rsp.merchant_uid); */

    

        // 인증성공

         jQuery.ajax({

        url: "내가 등록한 url", // 서비스 웹서버

        method: "POST",

        headers: { "Content-Type": "application/json" },

        data: { imp_uid: rsp.imp_uid }

                }).done(function() {

              

                });

    }

 

내가 등록한 url 로 보낸다.. 자 이제 데이터를 받아야 되는데

 

controller 에서  

 

@ResponseBody

@PostMapping("/certification")

public void certification(@RequestBody String imp_uid) throws ApiException {

 

}

 

자 위에서 POST방식으로 보냈고, 내가 등록한 url로 드러온다..

 

자 여기서 주요한건  @RequestBody String imp_uid 로 받아야 된다.

 

내가 실수했던건 파라미터라고 생각해서 @RequestParam 받았더니 값이 드러오질 않아서  웹이 잘 못된줄 알고 고생했다는 것이다.

Posted by thdeodls85