2023.07.26.WED

ronglong·2023년 7월 26일
0
  • Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure 에러
    다른 DB 서버는 연결이 되는데, 특정 DB 서버만 연결이 안 되길래, ssl 인증 오류로 접근이 막힌 것 같아서, application.yml 파일 datasource url 설정 마지막에 useSSL=false 넣어줬더니 연결됨. 굿.
spring.datasource.url=jdbc:mysql://호스트명:포트 번호/스키마명?useSSL=false
  • 코드 내에서 Url 만들고, 해당 API로 요청 날려서 값을 가져올 수 있다.
    HttpURLConnection, InputStreamReader, StringBuilder 등의 컴포넌트 이용.

  • mac appstore 에러
    https://eun-ng.tistory.com/3

[ 프로그래머스 ]

  • 크기가 작은 부분 문자열
    : 런타임 에러 나서 보니까 길이때문에 long 타입 사용해야 했다.
class Solution {
    public int solution(String t, String p) {
        int answer = 0;
        for(int i=0; i<t.length()-p.length()+1; i++){
            if(Long.parseLong(t.substring(i, i + p.length())) <= Long.parseLong(p)){
                answer++;
            }    
        }
        return answer;
    }
}

[ 느낀 점 ]

열공하자, 말하는 옥수수 ~

0개의 댓글