Spring관련 기술/서버개발

2024-08-31T15:23:38.935+09:00 INFO 19976 --- [common] [ main] c.l.feign.KakaoClientIntegrationTest : Started KakaoClientIntegrationTest in 6.552 seconds (process running for 9.803) OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended com.library.ApiException at com.library.feign.KakaoErrorDecoder.decode(KakaoErrorDecode..
@RequiredArgsConstructor@Componentpublic class ApplicationRunner implements CommandLineRunner { private final DailyStatRepository dailyStatRepository; @Override public void run(String... args) throws Exception { DailyStat stat1 = new DailyStat("HTTP", LocalDateTime.now()); DailyStat stat2 = new DailyStat("HTTP", LocalDateTime.now()); DailyStat stat3 = new DailyStat(..
MethodArgumentTypeMismatchException 파라미터의 Type(형식)이 제대로 넘어오지 않았을 때. LocalDate 타입으로 넘어와야하는데 String이나 int로 넘어온 경우  @ExceptionHandler(MethodArgumentTypeMismatchException.class) public ResponseEntity handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e) { log.error("MethodArgumentTypeMismatch Exception occurred. message={}", e.getMessage()); return Resp..
MissingServletRequestParameterException 필수 파라미터가 아예 빠져있을 때 발생  @ExceptionHandler(MissingServletRequestParameterException.class) public ResponseEntity handleMissingServletRequestParameterException(MissingServletRequestParameterException e) { log.error("MissingServletRequestParameter Exception occurred. parameterName={} message={}, className={}", e.getParameterName(), e.getMessage(), ..
URL 매핑이 잘못되어 있을 때, 못 찾을 때 예외 처리 방법올바른 URL: http://localhost:8080/v1/books/stats/ranking올바르지 않은 URL : http://localhost:8080/v1/books/stats/rankings이런 케이스에서 발생@Getterpublic enum ErrorType { EXTERNAL_API_ERROR("와부 API 호출 에러 입니다."), UNKNOWN("알 수 없는 에러입니다."), INVALID_PARAMETER("잘못된 요청값입니다."), NO_RESOURCE("존재하지 않는 리소스입니다."); ErrorType(String description) { this.description = desc..
https://docs.gradle.org/current/userguide/java_library_plugin.html The Java Library PluginThe Java Library plugin expands the capabilities of the Java Plugin (java) by providing specific knowledge about Java libraries. In particular, a Java library exposes an API to consumers (i.e., other projects using the Java or the Java Library plugin). Alldocs.gradle.orghttps://docs.gradle.org/current/userg..
솜사탕코튼
'Spring관련 기술/서버개발' 카테고리의 글 목록