Compare commits
No commits in common. "main" and "fix/sync-commit-msg" have entirely different histories.
main
...
fix/sync-c
@ -44,21 +44,7 @@
|
|||||||
- `@Builder` 허용
|
- `@Builder` 허용
|
||||||
- `@Data` 사용 금지 (명시적으로 필요한 어노테이션만)
|
- `@Data` 사용 금지 (명시적으로 필요한 어노테이션만)
|
||||||
- `@AllArgsConstructor` 단독 사용 금지 (`@Builder`와 함께 사용)
|
- `@AllArgsConstructor` 단독 사용 금지 (`@Builder`와 함께 사용)
|
||||||
|
- `@Slf4j` 로거 사용
|
||||||
## 로깅
|
|
||||||
- `@Slf4j` (Lombok) 로거 사용
|
|
||||||
- SLF4J `{}` 플레이스홀더에 printf 포맷 사용 금지 (`{:.1f}`, `{:d}`, `{%s}` 등)
|
|
||||||
- 숫자 포맷이 필요하면 `String.format()`으로 변환 후 전달
|
|
||||||
```java
|
|
||||||
// 잘못됨
|
|
||||||
log.info("처리율: {:.1f}%", rate);
|
|
||||||
// 올바름
|
|
||||||
log.info("처리율: {}%", String.format("%.1f", rate));
|
|
||||||
```
|
|
||||||
- 예외 로깅 시 예외 객체는 마지막 인자로 전달 (플레이스홀더 불필요)
|
|
||||||
```java
|
|
||||||
log.error("처리 실패: {}", id, exception);
|
|
||||||
```
|
|
||||||
|
|
||||||
## 예외 처리
|
## 예외 처리
|
||||||
- 비즈니스 예외는 커스텀 Exception 클래스 정의
|
- 비즈니스 예외는 커스텀 Exception 클래스 정의
|
||||||
|
|||||||
@ -227,11 +227,9 @@ public class AuthController {
|
|||||||
|
|
||||||
private void clearSessionCookies(HttpServletResponse response) {
|
private void clearSessionCookies(HttpServletResponse response) {
|
||||||
response.addHeader(HttpHeaders.SET_COOKIE,
|
response.addHeader(HttpHeaders.SET_COOKIE,
|
||||||
ResponseCookie.from("GC_SESSION", "")
|
ResponseCookie.from("GC_SESSION", "").path("/").maxAge(0).build().toString());
|
||||||
.path("/").httpOnly(true).secure(true).sameSite("Lax").maxAge(0).build().toString());
|
|
||||||
response.addHeader(HttpHeaders.SET_COOKIE,
|
response.addHeader(HttpHeaders.SET_COOKIE,
|
||||||
ResponseCookie.from("gc_proxy_auth", "")
|
ResponseCookie.from("gc_proxy_auth", "").path("/").maxAge(0).build().toString());
|
||||||
.path("/").httpOnly(true).secure(true).sameSite("Lax").maxAge(0).build().toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCookieValue(HttpServletRequest request, String name) {
|
private String getCookieValue(HttpServletRequest request, String name) {
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user