hello jiniworld

hello jiniworld

  • hello jiniworld (220)
    • Spring (59)
      • Basic (16)
      • Spring Docs (6)
      • Spring Data JPA Tutorial (14)
      • Spring Boot Tutorial (17)
      • Jersey (6)
    • Go (17)
    • Dev (10)
      • Clean Architecture (3)
      • System Design (2)
      • Documents (2)
      • Client (2)
    • Infrastructure (5)
      • Docker (1)
      • Kubernetes (4)
    • DB (20)
      • MySQL (9)
      • MariaDB (9)
      • Oracle (1)
    • Java (52)
      • Basic (14)
      • coding test (27)
      • Effective Java (11)
    • Python (7)
      • Flask (1)
      • Basic (3)
      • Effective Python (1)
      • coding test (2)
    • Front-end (3)
      • Vanilla JS (2)
      • Basic (1)
    • Linux (11)
      • Basic (2)
      • Command-line (9)
    • Web Server (6)
      • CentOS 7 (5)
      • Oracle Linux 8 (1)
    • WAS (3)
    • CentOS 7 (17)
      • Basic (9)
      • Jenkins (8)
    • Etc (10)
      • Windows 10 (3)
      • trash bin (3)
09-16 02:44
  • 전체보기
  • 방명록
  • jini's GitHub
  • demo api
  • chaeking api
RSS 피드
로그인
로그아웃 글쓰기 관리

hello jiniworld

컨텐츠 검색

태그

https codility Java week1 centos7 Command-Line Spring Boot Tutorial hackerrank MariaDB jenkins Spring Boot springboot Spring Jersey SpringBoot2 MySQL go JAX-RS spring docs effectivejava

최근글

댓글

공지사항

  • SSL 인증서 설정하기

아카이브

hello jiniworld(220)

  • [JDK 16] Pattern Matching for instanceof

    2022.05.06
  • [JDK 9] Immutable Collection 생성하기

    2022.05.06
  • [Java] Gson을 이용한 Json Serialization & Deserialization

    2022.04.29
  • [Command-line] free 명령어로 메모리 사용량 조회하기

    2022.04.21
  • [Spring Data JPA Tutorial] 14. Swagger v3 상세설정 및 request 유효성 검증

    2022.04.20
  • [Spring Data JPA Tutorial] 13. Response 전용 DTO 클래스 이용하기

    2022.04.18
[JDK 16] Pattern Matching for instanceof

JDK 16 부터 instanceof의 패턴 매칭을 지원합니다. 패턴 매칭은 타입을 강제로 설정해줌으로써 캐스팅을 잘못하여 발생되는 에러를 방지할 수 있습니다. JEP 394: Pattern Matching for instanceof instanceof 테스트를 하기 위해 먼저 아래와 같은 클래스를 선언했습니다. @Getter abstract static class Figure { protected String name; } @Getter static class Circle extends Figure { public Circle() { this.name = "원"; } } @Getter static class Square extends Figure { private final int line; publi..

2022. 5. 6. 14:36
[JDK 9] Immutable Collection 생성하기

Immutable Collection? JDK 9 버전 이전 moditable List 생성 예 - Arrays.asList immutableList List 생성 예 - Collections.unmodifiableList immutableList Set 생성 예 - Collections.unmodifiableSet JDK 9 버전 이후 List List.of List.copyOf Set Set.of Set.copyOf Map Map.of Map.copyOf Map.ofEntries 1. Immutable Collection? Immutable은 수정할 수 없는(=불변)을 뜻하는 말로, Immutable Collection을 다른 말로 표현하자면 읽기전용 컬랙션을 의미합니다. 어떤 데이터를 이용하고자 할..

2022. 5. 6. 11:51
[Java] Gson을 이용한 Json Serialization & Deserialization

Gson 테스트를 위한 사전 설정 html escaping 테스트 LocalDateTime 관련 객체 테스트 Gson 객체 생성하기 GsonUtils disableHtmlEscaping setFieldNamingPolicy setDateFormat serializeNulls LocalDateTime 관련 객체 serialize 테스트 코드 작성 및 에러 발생 TypeAdapter 정의하기 Gson 객체에 TypeAdapter 등록하기 결과 최종 GsonUtils 코드 1. Gson 1.1. Gson? Java 객체를 Json 문법으로 변환해주는 Java 라이브러리입니다. Json 문자를 Java 객체로 변환하는것도 제공합니다. Gson 2.9.x 버전은 Java 7 이상 버전부터 지원합니다. Java 객..

2022. 4. 29. 12:38
[Command-line] free 명령어로 메모리 사용량 조회하기

free free options 예제 -s && -c -w -t -h /proc/meminfo 1. free 1.1. free free [options] 시스템 상의 메모리 사용량을 조회하는 명령어 물리적 메모리 뿐만아니라 swap 메모리나 커널에 의해 사용된 버퍼나 캐시도 표시합니다. 모든 메모리 정보는 /proc/meminfo에 들어있으며 free 명령어는 /proc/meminfo를 파싱한 값을 모은 정보를 표현합니다. 메모리는 여러 컬럼으로 구분하여 표시되며, 각 컬럼에 대한 설명은 아래와 같습니다. total 총 메모리 MemTotal, SwapTotal used 사용중인 메모리 total - free - buffers - cache free free 메모리 MemFree, SwapFree sha..

2022. 4. 21. 11:39
[Spring Data JPA Tutorial] 14. Swagger v3 상세설정 및 request 유효성 검증

필요성 OpenAPI doc 관련 Annotation operation 그룹 설정: @Tag Schema 설정 : @Schema 상세 정보 설정 : @Operation response 설정 : @ApiResponse parameter 설정 : @Parameter 기존 api에 적용하기 @Tag 설정 @Schema 및 유효성 검증 설정 @Operation 설정 @ApiResponse 설정 @Parameter 설정 Exception 처리 보완 1. 필요성 Swagger를 이용하여 API를 자동 웹문서화 하였고, Response로 받게될 Example Value 형태까지 맞췄봤습니다. 그러나, 아직 Swagger 페이지 만으로 api 기능을 한눈에 알아보기 어렵습니다. 각 operation들에 대한 부연설명도..

2022. 4. 20. 17:46
[Spring Data JPA Tutorial] 13. Response 전용 DTO 클래스 이용하기

Response 전용 DTO 정의의 필요성 사전 작업 Response 용 DTO 정의 조회 api 수정 user 전체 조회 api user 단건 조회 api store 전체 조회 api store 단건 조회 api Response 결과 1. Response 전용 DTO 정의의 필요성 LazyInitializationException 해결하기 2. @OneToMany 시간 때에, @OneToMany 연관관계를 알아보기 위해, User 엔티티의 stores 필드에는 @JsonIgnore설정을 제거했고, Store 엔티티에서는 순환참조 에러를 방지하기 위해 user 필드값에 @JsonIgnore 설정을 추가했습니다. 그러나, 기존의 방식은 몇가지 문제점이 있습니다. User 조회 api에서 stores 정보를..

2022. 4. 18. 17:04
1 ··· 13 14 15 16 17 18 19 ··· 37
JINIWORLD
© jiniworld. All rights reserved.

티스토리툴바