본문 바로가기

분류 전체보기105

[Spring Batch] 5.1.2 Features 개요기존에는 Spring Batch 4.x.x 버전으로 개발하다가 최근에 5.1.2 버전으로 변경하면서  Spring Batch 5.1What's New in Spring Batch 5.1Dependencies upgradeVirtual Threads supportMemory management improvement in the JpaltemWriterNew synchronized decorators for item readers and writersNew Cursor-based Mongoltem ReaderBulk inserts support in MongoltemWriterNew item reader and writer for RedisAutomatic configuration of JobRegist.. 2024. 8. 21.
[Spring] Flyway DB Migration 개요수년 전 개발했던 프로젝트 중 mysql 5.x 버전으로 개발된 프로젝트의 Mysql 버전을 8.x 버전으로 올리고, 간단한 마이그레이션이 필요하여 Spring sql init으로 사용하던 DB 스키마 정의를 Flyway를 적용하여 마이그레이션 한다. FlywayDatabase migrations made easyFree - API/CLI and Desktop GUIBuil on Open SourceVersion control your database migration scriptsPowered by the Flyway commnity and RedgateFlyway는 DB 마이그레이션을 지원하는 도구로 API/CLI와 GUI 툴을 제공하며 다양한 데이터베이스를 제공한다.또한 Spring Boot와 .. 2024. 8. 5.
nGrinder on K8S 개요nGrinder를 다시 설치해야 하는 일이 생겨서 찾아보다가 K8S에 설치하여 사용할 수 없는지 찾아보다가 Docker HUB에 이미지가 업로드되어 있는 것을 보고 K8S에 설치하여 사용했다. InstallDocker Imagedocker hub에 공식 이미지가 있어서 바로 설치하여 사용가능하다.https://hub.docker.com/r/ngrinder/controllerK8SK8S에서 위 Docker 이미지를 구동을 위해서는 Deployment 파일을 작성하여 Controller와 Agent 인스턴스 실행이 필요한데 이것도 이미 작성해 주신 분이 있다. 참고 : https://github.com/KesavanKing/ngrinder-k8sDeployment 파일들은 받아서 resource: {} .. 2024. 7. 25.
Java JVM - Checkpoint Restore (CRaC) 개요이전 게시글에서 소개했던 Spring Runtime efficiency 문서에서(https://blog.igooo.org/115) CRaC에 대하여 소개한 적이 있는데 간단한 예제로 사용방법을 알아본다. K8S에 배포하는 파이프라인까지를 구성하고 문서를 작성하려고 했으나 사용 중인 K8S Node가 CRIU를(https://criu.org/Main_Page) 지원하지 않는 Ubuntu 배포판(20.04) 버전이라 K8S 배포는 추후에 작성한다. (Job으로 스냅샷을 생성하고 배포하는 방법) Spring Boot 3.2부터 CRaC를(https://spring.io/blog/2023/11/23/spring-boot-3-2-0-available-now) 지원하기 시작했다. CRaC는 Coodinated .. 2024. 7. 20.
Java - ReentrantLock 개요There are two scenarios in which a virtual thread cannot be unmounted during blocking operations because it is pinned to its carrier:When it executes code inside a synchronized block or method, orWhen it executes a native method or a foreign function.Pinning does not make an application incorrect, but it might hinder its scalability. If a virtual thread performs a blocking operation such as I/.. 2024. 7. 19.
[Spring] Springdoc-openapi 사용하여 API 문서 만들기 개요springdoc-openapi는 Spring Boot 프로젝트의 API 스팩에 대하여 자동으로 문서 생성을 해주는 라이브러리다. json, yaml, html 등 다양한 형식의 문서를 생성한다. OpenAPI 3 스팩을 지원한다. Getting Started간단한 Spring MVC Controller를 생성한다.@RestController@RequestMapping("/v1.0/pets")class PetApiController { private List> pets = List.of(Map.of("name", "pet1"), Map.of("name", "pet2")); @GetMapping List> findAll() { return this.pets; } @GetMapping("/{name}".. 2024. 7. 16.