스레드 상태값 1. new 2. runnable 3. blocked 4. waiting, timed_waiting 5. terminated 스레드 메소드 suspend resume deprecated됨, 필요하면 직접구현 sleep interrupt(중단, ex: 잠자고 있는것을 중단) join(다른 스레드 기다리기) yield(다른 스레드에게 양보, 별로 효과 없음) I/O block time-out static메소드 sleep, yield 스레드 자기 자신에게만 호출가능 동기화 효율을 높이기 위해서(synchronized 메소드에서만 사용) ex: 테이블(공동 객체, 동기화 필요), 요리사, 손님 관계 wait notify notifyAll (대상을 구분할수 없음, 개선책이 아래 lock&condit..
repository에서 dependency 파일을 다운로드 할때, 주기를 설정할수 있다. always - always check when Maven is started for newer versions of snapshots never - never check for newer remote versions. Once off manual updates can be performed. daily (default) - check on the first run of the day (local time) interval:XXX - check every XXX minutes 출처: https://stackoverflow.com/questions/3805329/how-does-the-updatepolicy-in-ma..
1. 정의 셀레니움은 웹 어플리케이션을 편리하게 테스트 하기 위하여 만들어진 tool. 2. 설치 셀레니움 다운로드 https://www.seleniumhq.org/download/ 브라우저 드라이버 다운로드 http://chromedriver.chromium.org/downloads 위 2개 파일을 다운로드해서 한개 폴더에 압축해제한다. 3. 설정 java 프로젝트 생성, 및 build path에서 셀레니움 jar파일 모두 추가 4. 예제 웹 크롤링 package selenium; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.Chrom..
방법1 Goods deepCopy = (Goods) SerializationUtils.clone(saved); 방법2 Goods deepCopy = null; try { deepCopy = objectMapper.readValue(objectMapper.writeValueAsString(saved), Goods.class); } catch (IOException e) { e.printStackTrace(); } 참조: https://www.baeldung.com/java-deep-copy
BasicAWSCredentials awsCreds = new BasicAWSCredentials("aws_access_key_id", "aws_secret_access_key"); final AmazonCloudWatch cw = AmazonCloudWatchClientBuilder.standard() .withCredentials(new AWSStaticCredentialsProvider(awsCreds)) .withRegion("ap-northeast-2").build();
public void setSearchWord(String searchWord) throws UnsupportedEncodingException { if (StringUtil.isEmpty(searchWord) == false && URLEncoder.encode(URLDecoder.decode(searchWord, "UTF-8"), "UTF-8").equals(searchWord) ) { this.searchWord = URLDecoder.decode(searchWord, "UTF-8"); } else { this.searchWord = searchWord; } } 문제상황 1. Front단에서 ajax GET 방식으로 보낼때 $.param(params, true)로 처리 2. 인코딩 되었는지 판단하지..