<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://jintheog.github.io/</id><title>Jin Lee</title><subtitle>A minimal, responsive and feature-rich Jekyll theme for technical writing.</subtitle> <updated>2025-12-15T07:04:49+00:00</updated> <author> <name>Jin Lee</name> <uri>https://jintheog.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://jintheog.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://jintheog.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator> <rights> © 2025 Jin Lee </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>@Builder</title><link href="https://jintheog.github.io/posts/@Builder/" rel="alternate" type="text/html" title="@Builder" /><published>2025-12-14T15:00:00+00:00</published> <updated>2025-12-15T07:04:28+00:00</updated> <id>https://jintheog.github.io/posts/@Builder/</id> <content type="text/html" src="https://jintheog.github.io/posts/@Builder/" /> <author> <name>Jin Lee</name> </author> <category term="Spring" /> <category term="MVC" /> <summary>@Builder Lombok이 제공 하는 어노테이션 빌터 패턴 (Builder Pattern)을 자동으로 만들어주는 기능 Builder Pattern 복잡한 객체를 단계별로 (조립하듯이) 만들어주는 디자인 패턴 객체를 만들 때 만은 파라미터가 있거나 옵션이 많은 객체 깔끔하게 생성하기 위해 사용돼. User user = new User(1L, "Jin", 34, "Seoul", true, null, ...); 생성자에 파라미터가 많으면 순서 외우기 힘듦 값이 어떤 의미인지 바로 안보임 선택적(optional) 옵션이 많으면 생성자 오버로드가 폭발함 빌터 패턴이 해결 하는 문제 파라미터 순서 기억할 필요 없음 User user = User.bu...</summary> </entry> <entry><title>@PathVariable</title><link href="https://jintheog.github.io/posts/@PathVariable/" rel="alternate" type="text/html" title="@PathVariable" /><published>2025-12-04T15:00:00+00:00</published> <updated>2025-12-05T09:04:10+00:00</updated> <id>https://jintheog.github.io/posts/@PathVariable/</id> <content type="text/html" src="https://jintheog.github.io/posts/@PathVariable/" /> <author> <name>Jin Lee</name> </author> <category term="Spring" /> <category term="MVC" /> <summary>✔️ PathVariable 은 URL 자체에서 값을 읽어온다다. 즉, 태그에서 hidden input 같은 것을 보내주는 게 아니라, form의 action URL 자체에 id가 포함되어 있으므로 Spring MVC가 그 값을 자동으로 PathVariable로 가져오는 것. ✔️ 실제 동작 과정 (완벽하게 설명) 1. form action 생성 form.html : th:action="${isEdit} ? @{/posts/{id}(id=${postId})} : @{/posts}" 만약 postId = 5 라고 하면, Thymeleaf가 이것을 해석해서 action을 다음과 같이 만들어줌: POST /posts/5 또는 POST /posts/5/edit (지금 너는...</summary> </entry> <entry><title>연관관계 처리 entity relationship mapping (Association)</title><link href="https://jintheog.github.io/posts/entity-relationship-management/" rel="alternate" type="text/html" title="연관관계 처리 entity relationship mapping (Association)" /><published>2025-11-25T15:00:00+00:00</published> <updated>2025-11-25T15:00:00+00:00</updated> <id>https://jintheog.github.io/posts/entity-relationship-management/</id> <content type="text/html" src="https://jintheog.github.io/posts/entity-relationship-management/" /> <author> <name>Jin Lee</name> </author> <category term="Spring" /> <category term="JPA" /> <summary>연관 관계 처리 : JPA가 엔티티들 사이의 관계(1:N, N:1, N:N, 1:1)를 자동으로 관리해주는 기능 Post → Comment, User → Order, Team → Member 같은 “테이블 간 관계”르 ㄹ객체에서도 자연스럽게 연결해서 사용 할 수 있게 만드는 것. 연관관계 처리 = DB 테이블 관계를 자바 객체 관계로 자동으로 이어주고, 그 관계를 편하게 사용할 수 있게 도와주는 JPA의 기능. DB에서는 관계를 FK로 관리함 e.g. Comment 테이블 | comment_id | post_id(FK) | content | | ———- | ———– | ——- | 자바 객체에서는 이런 관계가 그냥 숫자로만 존재하면 불편하다 Comment comme...</summary> </entry> <entry><title>Persistence Context 영속성 컨텍스트</title><link href="https://jintheog.github.io/posts/Persistence-context/" rel="alternate" type="text/html" title="Persistence Context 영속성 컨텍스트" /><published>2025-11-25T15:00:00+00:00</published> <updated>2025-11-25T15:00:00+00:00</updated> <id>https://jintheog.github.io/posts/Persistence-context/</id> <content type="text/html" src="https://jintheog.github.io/posts/Persistence-context/" /> <author> <name>Jin Lee</name> </author> <category term="Spring" /> <category term="JPA" /> <summary>Persistence Context : JPA의 핵심 JPA가 “마법처럼 보이는 기능”을 제공 하는 이유가 전부 여기서 나옴 영속성 컨텍스트: JPA가 엔티티를 저장하고 관리하는 1차 캐시(저장소) 엔티티를 넣어두고 상태 변화를 추적하고 DB 반영 시점을 조절하고 동일한 엔티티는 1개만 존재하도록 보장해줌 JPA내부의 (눈에 보이지 않는) 저장소 엔티티를 영속성 컨텍스트에 넣는 순간 “JPA가 관리 시작” Post post = postRepository.findById(1L).orElseThrow(); 이 순간 JPA는 이렇게 함: DB에서 Post(1번)를 가져옴 영속성 컨텍스트에 저장함 이후부터 post는...</summary> </entry> <entry><title>Path always begins with slash</title><link href="https://jintheog.github.io/posts/path-slash/" rel="alternate" type="text/html" title="Path always begins with slash" /><published>2025-11-17T15:00:00+00:00</published> <updated>2025-11-17T15:00:00+00:00</updated> <id>https://jintheog.github.io/posts/path-slash/</id> <content type="text/html" src="https://jintheog.github.io/posts/path-slash/" /> <author> <name>Jin Lee</name> </author> <category term="Spring" /> <category term="MVC" /> <summary>&amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html lang="en" xmlns:th="https://www.thymeleaf.org"&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta charset="UTF-8" /&amp;gt; &amp;lt;title&amp;gt;new&amp;lt;/title&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;h1&amp;gt;NEW&amp;lt;/h1&amp;gt; &amp;lt;form action="/todos/create"&amp;gt; &amp;lt;input type="text" name="title" /&amp;gt; &amp;lt;input type="text" name="content" /&amp;gt; &amp;lt;input type="submit" /&amp;gt...</summary> </entry> </feed>
