아래 프롬프트를 Claude Code에서 사용하면 원하는 스타일의 정적 사이트를 만들 수 있습니다. 이 접근법의 장점은 다음과 같습니다.
| 항목 | 설명 |
|---|---|
| 의존성 최소 | Pandoc + bash만 있으면 빌드 가능. 프레임워크 학습 불필요 |
| 구조 단순 | 템플릿 1개, 빌드 스크립트 1개로 전체 파이프라인 파악 가능 |
| 콘텐츠 분리 | Markdown만 편집하면 되므로 비개발자도 기여 가능 |
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.
|
Note
|
Spring Retry는 Spring Batch, Spring Integration 내부에서 재시도를 위해 사용되던 모듈이었다. Spring framework 7.0 부터는 Spring Core 모듈로 흡수가 되었다.
현재 버전의 유요한 사용법은 Resilience Features을 참고할 수 있다. 이 글에 소개된 @Recover와 @CircuitBreaker는 Spring framework 7.0에서는 지원되지는 않는다.
|
| 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"); | |
| } |
| 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("/") |
| 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; |
| private fun getResponse(disqusOauthUrl: String): ResponseEntity<String> { | |
| val endpoint = URI.create(disqusOauthUrl) | |
| val req = RequestEntity<Any>(HttpMethod.GET, endpoint) | |
| val resType = object : ParameterizedTypeReference<String>() {} | |
| return RestTemplate().exchange<String>(req, resType) | |
| } |
| package com.test.aop; | |
| import org.aspectj.lang.JoinPoint; | |
| import org.aspectj.lang.annotation.Aspect; | |
| import org.aspectj.lang.annotation.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.springframework.aop.support.AopUtils; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.context.annotation.Bean; |
| int count = 3; // main count1; | |
| int count2 = 3; // main count2; | |
| int count3 = 3; // main count3; | |
| int count4 = 3; // main count4; | |
| int causeCategoryCount = 3; // main count1; |