본문 바로가기

Programming/Java

Java8 G1 garbage collection 특징 Java 8 부터는 G1 GC 를 기본으로 설정 되어있다. 자세히 알아보기 전에 미리 알아두어야 할 것들이 있다. Java 7update 4 부터 parallel GC 가 기본으로 설정되어있다.JVM 옵션 (아래 둘 중에 아무거나 하나)-XX:+UseParallelGC-XX:+UseParallelOldGC parallel GC 의 특징application 의 throughput 이 latency 보다 중요할 때 (i.e. batch 프로그램) CMS GC 의 특징application thread 와 garbage collection thread 가 동시에 실행된다.application latency 를 향상 시키는 것에 주안점을 두었다. (GC 의 횟수를 줄이는 것)parallel GC 보다 약 10~2.. 더보기
Java GC tuning 현재 이용가능한 Java GC 알고리즘들에 대해서 간단하게 알아보고 tuning 하는 방법에 대해서 알아봅니다. 자료가 약간 오래되어서 지금은 적용이 안 될 수도 있는 것이 있습니다. 자료 다운로드 더보기
Functional Programming in Java Part2 - Java8 Java 8 언어로 어떻게 하면 함수형으로 프로그래밍 할 수 있는 지 보여줍니다. 자료 다운로드 더보기
Functional Programming in Java Part1 - Java8 Java 8 언어로 어떻게 하면 함수형으로 프로그래밍 할 수 있는 지 보여줍니다. 자료 다운로드 더보기
IntelliJ 를 사용하는 이유와 유용한 팁 모음 (14 버전 기준) 예전에 발표 자료를 만들어 둔 것인데 다른 분들에게도 유용할 거 같아서 공유 합니다. 더보기
unit test 가 아닌 것들 unit test 를 작성할 시 참고할 만하여 정리한다. unit test 가 아닌 것들은 아래와 같다. 이러한 테스트 들은 Integration 테스트를 통하거나, mock 을 이용하여 테스트 하는 것이 바람직하다. 데이터 베이스와 통신하는 것네트워크를 통해 테스트파일 시스템을 건드리는 것다른 unit test 와 동시에 실행이 되지 않는 것들실행 하기 위해서 특정한 환경변수를 건드려야 하는 경우 더보기
Linux cron vs Spring cron Linux cron 을 설정하는 것은 아래와 같다.# minute hour day month week 하지만 Spring 에서 @Scheduled annotation 을 사용하여 cron 을 설정하는 것은 아래와 같다.# second minute hour day month week 차이점은 Spring 에서 cron 은 초 단위로 cron 이 진행된다. 더보기
Setting up logback in Java and Scala project Logback is promising log library I think, So in this time, I am going to set up logback in Java and Scala project using maven. Setting up logback is quite straitforward and simple. At first, you have to download maven dependencies.Things to remember you have to, org.slf4j library and ch.qos.logback libraries version should match each other. Otherwise, you have error message during executing prog.. 더보기
spring restful service - JSON response In Spring, we could get following error message from REST client or other HttpClient modules, when we have not implemented fields getter / setter methods in class that represents JSON response object. The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers (). 더보기
IntelliJ GenerateSerialVersionUID In IntelliJ, compared with Eclipse, you should install GenerateSerialVersionUID manually, if you want get serialVersionUID field automatically. (IntelliJ 에는 Serializable interface 를 implements 할 경우, serialVersionUID 를 자동으로 생성해 주는 plugin 을 설치해야 한다.) Install plugins like below (아래와 같은 방식으로 설치를 하면 된다.)Preference -> Plugins -> Browse repositories -> GenerateSerialVersionUID 더보기