Skip to content

Instantly share code, notes, and snippets.

View ihoneymon's full-sized avatar

Kim Ji-Heon ihoneymon

View GitHub Profile
@ihoneymon
ihoneymon / 20171031_ksug_serverless.asc
Last active March 7, 2023 16:31
Dave syer@Spring I/O 2017 에서 발표한 "The Road to Serverless: Functions as Applications" 에 대한 내용정리

The Road to Serverless: Functions as Applications Review

@ihoneymon
ihoneymon / 2020-05-18-java-csv-write-and-read.md
Created May 18, 2020 06:19
별다른 라이브러리를 사용하지 않고 JDK 만 이용해서 파일읽고쓰기 기능 구현

JAVA - 간단한 CSV 쓰고 읽기

별다른 라이브러리를 사용하지 않고 JDK 만 이용해서 파일읽고쓰기 기능 구현

CsvSheet.java

import lombok.Getter;
import lombok.NoArgsConstructor;
@ihoneymon
ihoneymon / 20171103_flyway_intro_script.asc
Last active January 8, 2023 07:14
Flyway 소개영상을 위한 스크립트

Flyway 기능소개

준비

  • 스프링 부트에서 다음 의존성을 추가한다.

build.gradle
@ihoneymon
ihoneymon / 20180917_spring_rest_docs_requestbuilder.adoc
Created September 17, 2018 03:28
Spring REST DOCs에서 pathParameters 를 사용하는 경우 `MockMvcRequestBuilders` 를 `RestDocumentationRequestBuilders` 로 변경한다.

[spring] REST Docs 사용중 urlTemplate not found. If you are using MockMvc did you use RestDocumentationRequestBuilders to build the request?

@ActiveProfiles("test")
@RunWith(SpringRunner.class)
@SpringBootTest
public class BookControllerTest {
    private MockMvc mockMvc;
    @Rule
@ihoneymon
ihoneymon / springboot-introduction.md
Last active October 14, 2022 08:44
스프링부트 소개

스프링부트 소개

0. 스프링부트SpringBoot란?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

  • 스프링부트는 단독실행되는, 실행하기만 하면 되는 상용화 가능한 수준의, 스프링 기반 애플리케이션을 쉽게 만들어낼 수 있다.
  • 최소한의 설정으로 스프링 플랫폼과 서드파티 라이브러리들을 사용할 수 있도록 하고 있다.
@ihoneymon
ihoneymon / 20190408-kotlin-night-seoul.adoc
Last active July 9, 2021 16:59
깃헙은 은근히 여기저기 얼굴을 많이 비춘다. 아직도 목마른가?

20190408 Kotlin Knight 서울

자바 개발자 관점의 '왜 코틀린인가?' (by 강현식)

  • Java 8 이상 쓰는 곳이 거의 없다.

  • 자바코드는 장황하다?

    • 롬복(Lombok)

      • 롬복이 지원안될 수 있다.

      • Annotation Processor 와 충돌 가능성

[spring-boot] Junit5 적용기

JUnit5 의존성 추가

JUnit5가 세상에 모습을 드러내놓은지는 제법 됐다. 새로운 프로젝트를 시작하면서 JUnit5 와 Spock 을 기반으로 한 테스트를 작성하고자 한다.

스프링 부트 2에서 JUnit5 에 대한 의존성을 추가하고 테스트를 작성하는 방법을 설명한다.

20190528 [java] HeapDump 분석하기

아직까지는 메모리 릭 등의 문제로 힙덤프(HeapDump)를 생성하고 이를 분석하는 일을 해본 경험은 없다(…​ 이 넓고 얕은 지식이여).

우아한형제들 회사 블로그(도움이 될수도 있는 JVM memory leak 이야기, http://woowabros.github.io/tools/2019/05/24/jvm_memory_leak.html)를 보고 난 이후, '방법은 알아(정리해)둬야겠다' 싶어 정리한다.


@ihoneymon
ihoneymon / SpringSecurity5DelegatingPasswordTest.java
Created February 12, 2018 04:38
Spring Security5 add DelegatingPasswordEncoder test code
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.*;
import java.util.HashMap;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
@ihoneymon
ihoneymon / TestTemplate.java
Created September 20, 2017 01:18
@before, @after 를 제대로 활용하지 못해서 슬퍼...
import com.wirebarley.webservice.domain.Tx;
import com.wirebarley.webservice.domain.User;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runners.Parameterized;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;