Tag: java

0

SnakeYAML을 통해 YAML을 클래스와 매핑하기

Spring Boot는 설정파일로 .properties 파일을 사용하지만 확장자를 변경해서 .yml 파일도 사용할 수 있다. 또한 @EnableConfigurationProperties을 통해 설정파일의 key, value를 클래스 프로퍼티로 매핑할 수 도 있다. 이러한 YAML 파일을 사용해서 편리한 기능을 사용할 수 있는 것은 Spring Boot의 특

0

String constant pool

먼저 코드를 보자 12345678String str1 = "hello";String str2 = "hello";String newString = new String("hello");String intern = newString.intern();System.out.println(str1 == str2); // trueSystem.out.println(str1

0

Runtime의 메모리 정보

Runtime 객체의 memory 관련 메서드 12345678910111213141516171819202122232425262728293031323334/** * Returns the amount of free memory in the Java Virtual Machine. * Calling the * <code>gc</code> me

0

IntelliJ 에서 Gradle 프로젝트로 Junit 시작하기

1. Gradle 프로젝트를 생성하면 다음과 같이 프로젝트 구조가 생성될 것이다. 2. 다음 설정을 체크하여 default directory 생성 Settings의 Gradle에서 Create directories for empty content roots automatically를 체크한후 ‘OK’ 출처 stackoverflow 3. 다음과 같이 defa