Skip to content

Instantly share code, notes, and snippets.

View benelog's full-sized avatar

Sanghyuk Jung benelog

View GitHub Profile
@benelog
benelog / spring-batch-4-to-6.md
Last active April 18, 2026 16:36
Spring Batch 4/5 → 6 업그레이드 체크리스트

Spring Batch 4 → 6 / Spring Boot 2.7 → 4 업그레이드 작업 지시서

작업 원칙

  • 아래 체크리스트를 위에서 아래로 순서대로 적용한다.
  • 각 소절에 실린 rg 패턴을 돌려서 걸리는 파일을 빠짐없이 확인하고 교체한다.
  • deprecated API는 무조건 비-deprecated 대체 API로 교체한다. "이전 형태도 동작한다"는 이유로 남겨 두지 않는다.
  • 확신이 없는 지점이 나오면 멈추고 사람에게 질문한다. 추측으로 진행하지 않는다.
  • 소절마다 컴파일과 테스트를 돌려 회귀가 없는지 확인한다.
  • 변경 근거를 커밋 메시지에 해당 소절 제목으로 남긴다.
@benelog
benelog / history.md
Created April 10, 2026 13:23
Dell XPS 13 9350 (Lunar Lake) 웹캠 패치 — Intel CVS SET_HOST_IDENTIFIER fix

웹캠 패치 완성까지의 과정

Dell XPS 13 9350 (Lunar Lake, OV02C10 센서) 웹캠 비작동 문제를 해결하기까지의 기록. 3/6~4/10, 약 1개월간 7+ 세션.


Phase 1: 증상 파악 (3/6)

Dell XPS 13 9350 (Lunar Lake)에서 웹캠 비작동. /dev/video0은 v4l2loopback 가상 디바이스일 뿐, 실제 카메라 없음. dmesg 에러 체인:

@benelog
benelog / README.md
Last active April 22, 2026 14:16
연세대 ibook 뷰어에서 책을 PDF로 다운로드

View to PDF

연세대 ibook 뷰어(https://ibook.yonsei.ac.kr)에서 책을 PDF로 다운로드합니다.

필요 환경

  • Python 3
  • img2pdf (pip install img2pdf)

사용법

내장 웹캠 불량 해결 기록

  • 날짜 : 2026-02-19

  • 장비: Dell XPS 13 9350 (Intel® Core™ Ultra 7 258V (Intel Lunar Lake) )

  • OS : Ubuntu 24.04 LTS

증상

부팅 후 내장 웹캠(/dev/video0, ``Intel MIPI Camera'')이 동작하지 않음.

@benelog
benelog / static-site-generation-by-claude.md
Last active February 14, 2026 14:04
정적 사이트 생성 프롬프트

Pandoc과 쉘 스크립트를 활용하는 정적 웹사이트 생성 프롬프트

아래 프롬프트를 Claude Code에서 사용하면 원하는 스타일의 정적 사이트를 만들 수 있습니다. 이 접근법의 장점은 다음과 같습니다.

항목 설명
의존성 최소 Pandoc + bash만 있으면 빌드 가능. 프레임워크 학습 불필요
구조 단순 템플릿 1개, 빌드 스크립트 1개로 전체 파이프라인 파악 가능
콘텐츠 분리 Markdown만 편집하면 되므로 비개발자도 기여 가능
@benelog
benelog / mysql-options.adoc
Last active February 21, 2026 13:40
MySQL JDBC Configuration for High-Performance Batch Jobs

MySQL JDBC Configuration for High-Performance Batch Jobs

Using Server-Side Prepared Statements

PreparedStatement helps optimize repeated query execution. Instead of declaring the entire SQL string such as SELECT * FROM CITY WHERE COUNTRY = 'KOREA' AND POPULATION > 10000, it separates the static SQL structure SELECT * FROM CITY WHERE COUNTRY = ? AND POPULATION > ? from the dynamic parameters.

@benelog
benelog / spring-retry.adoc
Last active December 2, 2025 22:43
Spring retry
Note
Spring Retry는 Spring Batch, Spring Integration 내부에서 재시도를 위해 사용되던 모듈이었다. Spring framework 7.0 부터는 Spring Core 모듈로 흡수가 되었다. 현재 버전의 유요한 사용법은 Resilience Features을 참고할 수 있다. 이 글에 소개된 @Recover@CircuitBreaker는 Spring framework 7.0에서는 지원되지는 않는다.

스프링 리트라이로 하는 재시도

실습 프로젝트 초기 설정

@benelog
benelog / Application.java
Created May 28, 2025 21:39
Smart UI : Model1 by Spring Boot
public class Application implements WebMvcConfigurer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/repos").setViewName("repos");
}
@benelog
benelog / DemoApplication.java
Last active January 15, 2024 22:16
GET + body by RestTemplate
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController("/")
@benelog
benelog / RemoteFileClient.java
Last active November 27, 2023 21:22
URL을 파일로 복사
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;
import java.time.Duration;
public class RemoteFileClient {
private final HttpClient httpClient;