API? ?? ??????? ?????. Spring Boot? ?? API ??? ???? ? ?? ??? ?? ??? ??? ? ?? ??? ??? ???? ??????. ?? ??? ???? ???? ??? ??? ???? API? ??? API? ???? ??? ? ?? ??? ??? ??? ?????. ??? ?? ??? ? ?? ??? ?? ??? ??? ??? ??????. ???? ???? ??? ??? ?? ? ??? ????.
?? 1: ?? ?? ?? ??
?? ?? ????? ?? ???? ? ???? ?3? ???? ?? ???? API? ??????. ?? ??? ???? ?? ???? ??? ???? ????? ?? ?? ??? ??? ?? ?????. ???? ???? ?? ???? ??? ???? ???? ?? ?? ??? ?????. ? API? ??? ???? ??? ?????.
??: API? ???? ??? ??????. ?? ???? ???? ???? ???? ?? ??? ??????. ??? ??? ??? 500 ?? ?? ??? ??? ????.
?? ??: ?? ?? ?? ?? ??? ???? ??????. Spring Boot? ???? ??? ??? ??? ??? ????.
@Configuration public class RestTemplateConfig { @Bean public RestTemplate restTemplate(RestTemplateBuilder builder) { return builder .setConnectTimeout(Duration.ofSeconds(5)) .setReadTimeout(Duration.ofSeconds(5)) .additionalInterceptors(new RestTemplateLoggingInterceptor()) .build(); } // Custom interceptor to log request/response details @RequiredArgsConstructor public class RestTemplateLoggingInterceptor implements ClientHttpRequestInterceptor { private static final Logger log = LoggerFactory.getLogger(RestTemplateLoggingInterceptor.class); @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { long startTime = System.currentTimeMillis(); log.info("Making request to: {}", request.getURI()); ClientHttpResponse response = execution.execute(request, body); long duration = System.currentTimeMillis() - startTime; log.info("Request completed in {}ms with status: {}", duration, response.getStatusCode()); return response; } } }
? ???? ??? ?? ??? ??? ?? ??? ?? ??? ??? ?????? ? ??? ?? ??? ?????.
?? 2: ?? ???? ???? ??
?? ?? ????: ??? ???? ?? ???? ? ?? ?? ??? ?? ?????. ? API? ??? ???? ???? ?????. ?? ??? ??? ?? ????? ?? ????? ?? ???? ? ?? ??? ??????.
??? ??? ?? ????? ?? ??? ?? ? ?????. ??? ???? ???? ?? ???? ????? ??? ??? ??? ? ????.
??: ???? ???? ?? ???? ????? ??????? ?? ??? ???? ?? ????? ??? ?????.
?? ??: ?? ?? ??? ??? ??????. Spring Cloud Resilience4j? ???? ??? ???? ?? ? ?????.
@Configuration public class Resilience4jConfig { @Bean public CircuitBreakerConfig circuitBreakerConfig() { return CircuitBreakerConfig.custom() .failureRateThreshold(50) .waitDurationInOpenState(Duration.ofSeconds(60)) .permittedNumberOfCallsInHalfOpenState(2) .slidingWindowSize(2) .build(); } @Bean public RetryConfig retryConfig() { return RetryConfig.custom() .maxAttempts(3) .waitDuration(Duration.ofSeconds(2)) .build(); } } @Service @Slf4j public class ResilientService { private final CircuitBreaker circuitBreaker; private final RestTemplate restTemplate; public ResilientService(CircuitBreakerRegistry registry, RestTemplate restTemplate) { this.circuitBreaker = registry.circuitBreaker("internalService"); this.restTemplate = restTemplate; } @CircuitBreaker(name = "internalService", fallbackMethod = "fallbackResponse") @Retry(name = "internalService") public String callInternalService() { return restTemplate.getForObject("https://internal-service.com/data", String.class); } public String fallbackResponse(Exception ex) { log.warn("Circuit breaker activated, returning fallback response", ex); return new FallbackResponse("Service temporarily unavailable", getBackupData()).toJson(); } private Object getBackupData() { // Implement cache or default data strategy return new CachedDataService().getLatestValidData(); } }
? ??? ??? ? API? ?? ???? ?? ???? ???? ?? ???? ??? ???? ??????.
?? 3: ??? ?? ??
?? ?? ????: ???? ?? ??? ?? ?? ???? ?????. ? API??? ???? ??(?: ?? ??? HTTP 500)? ????? ?? ??? ??? ?? ?? ??? ???????.
??: ???? ??? ?????? ???????, ?? ????? ???? ???? ?? ??? ??????.
?? ??: Spring? @ControllerAdvice ??? ???? ?? ??? ?? ?????? ??????. ?? ? ?? ??? ????.
@Configuration public class RestTemplateConfig { @Bean public RestTemplate restTemplate(RestTemplateBuilder builder) { return builder .setConnectTimeout(Duration.ofSeconds(5)) .setReadTimeout(Duration.ofSeconds(5)) .additionalInterceptors(new RestTemplateLoggingInterceptor()) .build(); } // Custom interceptor to log request/response details @RequiredArgsConstructor public class RestTemplateLoggingInterceptor implements ClientHttpRequestInterceptor { private static final Logger log = LoggerFactory.getLogger(RestTemplateLoggingInterceptor.class); @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { long startTime = System.currentTimeMillis(); log.info("Making request to: {}", request.getURI()); ClientHttpResponse response = execution.execute(request, body); long duration = System.currentTimeMillis() - startTime; log.info("Request completed in {}ms with status: {}", duration, response.getStatusCode()); return response; } } }
?? ?? ?? ???? ???? ????? ???? ??? ???? ??? ?????.
?? 4: ?? ?? ??
?? ?? ????: ?? ??? ?, ???? ???? ????? API ???? ??????. ?? ????? ?? ?????? ?? ???? API? ?? ??? ??? ???? ?? ?? ?? ???? ???? ???????.
??: ??? ??? ????? ??? ??????.
?? ??: ? ??? ???? ?? Redis? ?? Bucket4j? ???? ?? ??? ??????. ?? ??? ????.
@Configuration public class Resilience4jConfig { @Bean public CircuitBreakerConfig circuitBreakerConfig() { return CircuitBreakerConfig.custom() .failureRateThreshold(50) .waitDurationInOpenState(Duration.ofSeconds(60)) .permittedNumberOfCallsInHalfOpenState(2) .slidingWindowSize(2) .build(); } @Bean public RetryConfig retryConfig() { return RetryConfig.custom() .maxAttempts(3) .waitDuration(Duration.ofSeconds(2)) .build(); } } @Service @Slf4j public class ResilientService { private final CircuitBreaker circuitBreaker; private final RestTemplate restTemplate; public ResilientService(CircuitBreakerRegistry registry, RestTemplate restTemplate) { this.circuitBreaker = registry.circuitBreaker("internalService"); this.restTemplate = restTemplate; } @CircuitBreaker(name = "internalService", fallbackMethod = "fallbackResponse") @Retry(name = "internalService") public String callInternalService() { return restTemplate.getForObject("https://internal-service.com/data", String.class); } public String fallbackResponse(Exception ex) { log.warn("Circuit breaker activated, returning fallback response", ex); return new FallbackResponse("Service temporarily unavailable", getBackupData()).toJson(); } private Object getBackupData() { // Implement cache or default data strategy return new CachedDataService().getLatestValidData(); } }
?? ?? ??? ??? ???? API? ???? ??? ?????.
?? 5: ?? ???? ???
?? ?? ?????? ?? ???? ??? ??? ??? ?? ?? ???? ??? ?? ?? ?????. ??? ???? ??? ???? ?? ?? ??? ???? ? ???? ??? ?? ?????.
??: ?? ??? ??? ?? ?? ??? ???? ???? ??? ?????.
?? ??: ?? ??? ?? Spring Boot Actuator? ???? ??? ???? ?? Prometheus? Grafana? ??????.
@RestControllerAdvice @Slf4j public class GlobalExceptionHandler extends ResponseEntityExceptionHandler { @ExceptionHandler(HttpClientErrorException.class) public ResponseEntity<ErrorResponse> handleHttpClientError(HttpClientErrorException ex, WebRequest request) { log.error("Client error occurred", ex); ErrorResponse error = ErrorResponse.builder() .timestamp(LocalDateTime.now()) .status(ex.getStatusCode().value()) .message(sanitizeErrorMessage(ex.getMessage())) .path(((ServletWebRequest) request).getRequest().getRequestURI()) .build(); return ResponseEntity.status(ex.getStatusCode()).body(error); } @ExceptionHandler(Exception.class) public ResponseEntity<ErrorResponse> handleGeneralException(Exception ex, WebRequest request) { log.error("Unexpected error occurred", ex); ErrorResponse error = ErrorResponse.builder() .timestamp(LocalDateTime.now()) .status(HttpStatus.INTERNAL_SERVER_ERROR.value()) .message("An unexpected error occurred. Please try again later.") .path(((ServletWebRequest) request).getRequest().getRequestURI()) .build(); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(error); } private String sanitizeErrorMessage(String message) { // Remove sensitive information from error messages return message.replaceAll("(password|secret|key)=\[.*?\]", "=[REDACTED]"); } }
?? ELK Stack(Elasticsearch, Logstash, Kibana)? ???? ???? ??? ??????. ?? ?? ??? ?? ???? ?? ??????.
?????
??? ?? API? ???? ?? ??? ???? ??? ? ??? ?????. ?? ?? ?? ??? ??? ????.
- ?? ?? ??? ?? ?? ??? ?????.
- ?? ??? ????? ?? ???? ?????.
- ?? ??? ?? ????? ???? ???? ????.
- ??? ??? ???? ?? ?? ??? ?????.
??? ??? ?? API ??? ???? ??? ???????. ??? ??? ????? ?? ?? ??? ??? ???? ?? ????!
?? ??: ???? ???? ??? ??? ???? ???? ???? ?????. ??? ? ?? ??? ??? ?? ??? ???? ????? ????? ?? ???? API? ??? ? ??? ??? ???.
? ??? ???? API ??: ?? ??? ??? ?? ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Java? ??? ?? ??, ?? ? ??? (? : Projectreactor) ? Java19? ?? ???? ??? ??? ?????? ?????. 1. CompletableFuture? ?? ??? ?? ?? ??? ? ?? ??? ????? ?? ??????? ? ?? ??? ?????. 2. Projectreactor? ?? ? ??? ??? ???? ?? ???? ? ??? ???? ?? ? ?????? ?????. 3. ?? ???? ??? ??? ??? I/O ??? ? ??? ???? ?? ??? ????? ??? ???? ????. ? ???? ?? ??? ????? ??? ??? ??? ?? ??? ??? ?????? ???? ???? ?? ?? ??? ??????.

Java?? ??? ?? ?? ??? ???? ? ?????. ?? ???? ??? ?????. 1. ?? ?? ? ???? ??????? ?? ?? ?? ??? ???? ??? ?????. 2. ?? ??, ???, ??? ?? ?? ?? ???? ????? ?? ??? ??? ??? ?????. 3. ENUMMAP ? ENUMSET? ???? ?? ? ?? ???? ???? ??? ???? ? ?????? ?????. 4. ?? ?, ??? ?? ?? ??? ?? ????? ?? ??? ??? ?????.? ????? ?? ???? ????????. ??? ???? ???? ?? ??? ????? ??? ?? ? ??? ?? ?????? ???????.

Javanio? Java 1.4? ?? ? ??? IOAPI???. 1) ?? ? ??? ?????, 2) ??, ?? ? ??? ?? ?? ??, 3) ? ??? ??? ???? 4) ?? ??? ?? IO?? ? ????? ?????. 1) ? ?? IO? ??? ?? ??? ???, 2) ??? ??? ?? ???? ?????, 3) ???? ?????? ???? 4) ??? ?? ??? ?? ?? ? ??? ?????. 1) ??? ??/??? ??? ?? ?????, 2) ???? ???? ???? ?? ???? ???????. 3) ??? ??? ??? ???????.

?? ?? Java? ?? ???? ?? ? ? ? ????? ????, ? ??? ??? ??? ??? ???? ? ????. 1. ?? ?? hashcode () ???? ???? ?? ?? ???? ?? ??? ?? ?? ???? ?????. 2. ?? ??? ??? ?? ?? ???? ??? ??? ? ????. ?? ??? ?? ? ??? ??? ?????. JDK8 ? ?? ? ??? ?? ?? (?? ?? 8) ??? ????? ?? ???? ?? ? ??? ?????. 3. ??? ?? ???? ?? ???? ?? equals () ? hashcode () ???? ?? ???????. 4. ?? ?? ??? ???? ?????. ?? ?? ??? ???? ?? ?? (?? 0.75)? ??? ?? ? ???; 5. ?? ?? ??? ??? ??? Multithreaded?? Concu? ???????.

Java ??? ??? ???? ??? ??? ??? ?????, ???? ????, ?????? ??? ? ????. 1. ??? ????? ???? ??? ? ? ??? ?? ?? ????? ???? ? ???? ??????. 2. ???? ?? ?? ???? ??? ??? ???? ?? ?? ???? ??? ??? ? ????. 3. ???? ???? ??? ??? ?? ??? ?? ? ? ??????. 4. ?? ?? ?? ??? ? ??? ??? ?? ????? ?? ?? ??? ??? ? ????. 5. ??, ?? ?? ??, ?? ?? ?? ???, ????? ?? ?? ? ???? ??? ????? ??????.

Java? Singleton Design Pattern? ???? ??? ???? ? ?? ?? ??? ? ?? ??? ?? ??? ??? ???? ???? ?? ???? ?? ???? ???? ??? ?????. ?? ???? ??? ?????. 1. ?????, ? ????? ? ?? ??? ?? ? ?? ????, ?? ?? ??? ?? ??? ???? ?? ??? ?????. 2. ???-?? ??, ??? ?? ?? ?? ?? ??? ?? ?? ??? ???? ??? ???? ? ???? ?? ??? ????. 3. ??? ?? ?? ????? ?? ????? ??? ??? ?? ??? ? ??? ??? ?? ?? ????? ?????. 4. ?? ??? ???? ???, ??? ??? ? ?? ??? ???? ?? ??? ???? ??? ??? ?????. ?? ??? ?? ?? ?? ??? ??? ? ????.

?? ??? ??? ???? ???? ? ??? ?? ?? ???? ?? ? ????. 1. ??. ofnullable? null ??? ??? ???? ?????. ?? ??, ??? ?? ??? ? Orelse? ???? ???? ? ???? ??? ???? ?????. 2. ?? ?? ?? ???? ?? ?? ???? NPE? ???? ??? ??? ??? ???? ???? ???? ?????. 3. ??? ??? ???? ??? ? ???, ??? ???? ???? ?? ??? ?? ?????. ??? ??? ??? ???? ??? ??? Orelse? ?? ?????. 4. ?? ???? ??? ??? ?? ??? ??? ???? ???? ?? ???? ???? ???? ?? ??? ?? ????? NU? ?? ?????.

java.io.notserializableException? ????? ?? ?? ??? ??? ???? ?? ???? ??? ??? ?????? ???? ?? ? ??? ??? ??? ????? ???? ????. 1. ?? ???? ??? ??????. 2. ???? ?? ??? ?? ???? ??? ??? ?????????. 3. ??? ? ????? ?? ??? ??? ??????. 4. ?? ?? ?? ? ???? ? ??? ??? ??????. 5. ?????? ???? ?? ???? ??????. 6. ? ??? ?? ?? ??? ??? ?? ?? ??? ?? ??? ??? ???? ?? ??? ??????. 7. ??? ??????
