이를 해결하기 위한 방법으로 /dev/random -> /dev/urandom , /dev/.urandom 등이 존재하나
별도의 VM 옵션이 필요
시스템 별로 의존성이 달라짐
따라서 non-blocking 의 UUID generation 을 위해 ThreadLocalRandom 을 이용한다.
UUID Generator
public final class RandomGenerator {
private RandomGenerator() {
}
private static final ThreadLocalRandom random = ThreadLocalRandom.current();
public static UUID getUUID() {
// https://github.com/apache/openwhisk/issues/2747
return new UUID(random.nextLong(), random.nextLong());
}
public static String getUUIDString() {
return getUUID().toString();
}
public static long getLong() {
return random.nextLong();
}
}
Table of Contents 들어가기에 앞서Aggregated querying (customize)Jdbc Cursor Item Readercustom RowMapperBatch Job, Step 구현정리JdbcTemplate Result Set Extractor마치며들어가기에 앞서 SQL 을 이용하다보면 GROUP BY 절을 자주 사용하게됩니다. Batch 의 Item reader 에서도 GROUP BY 절을 사용하여 더보기…
Logback Spring framework 환경에서 테스트 코드 실행시, testbed profile 에 대해 별다른 logback 설정이 없다면 , 아래와 같이 debug 로그부터 info 로그까지 바리바리 올라온다. 하지만 대부분의 로그는 assertion 에 관한 로그가 아닌, springframe context 더보기…
0개의 댓글