Fading Coder

One Final Commit for the Last Sprint

Deploying MinIO for Object Storage with Spring Boot Integration

Windows Environment Setup MinIO is a lightweight, high-performance object storage system written in Go. It provides an S3-compatible API and is suitable for local deployments or on-premise infrastructure. Local Installation Download the windows-amd64 executable from the official repository. Place mi...

Spring Boot Test Injection Failure Troubleshooting

Unit Test Template @RunWith(SpringRunner.class) //@SpringBootTest(classes = PersonConfig.class) @ContextConfiguration(classes = PersonConfig.class) class Test { @Resource private PersonEventService personEventService; @Test public void test() { // ApplicationContext context = new AnnotationConfigApp...

Implementing High-Concurrency Product Flash Sale System with Spring Boot

System Initialization Initialize product inventory in Redis for caching: @RestController public class FlashSaleController { @Autowired private RequestAggregatorService aggregator; @Autowired private RedisTemplate<String, Object> cache; @PostMapping("/purchase") public ApiResponse pro...

Resolving ServerContainer Not Available Error in Spring Boot WebSocket Tests

When running test classes in a Spring Boot application with WebSocket integration, you may encounter the error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' Invocation of init method failed; nested exception is java.lang.IllegalState...

Separating Dependencies for Gradle Multi-Module Spring Boot Applications

Project Hierarchy . ├── acme-utils │ ├── build.gradle.kts │ └── src ├── acme-domain │ ├── build.gradle.kts │ └── src ├── acme-repository │ ├── build.gradle.kts │ └── src ├── acme-security │ ├── build.gradle.kts │ └── src ├── acme-app-runner │ ├── build.gradle.kts │ └── src ├── buildSrc │ ├── build │...

Implementing Date-Filtered Article Archives and AOP-Driven Redis Caching

Implementing Date-Filtered Article Archives The archive endpoint accepts a POST request at /articles, expecting year and month parameters within the request body. The response adheres to a standardized envelope containing a success indicator, HTTP status code, descriptive message, and an array of ar...

Global Error Handling for Spring WebFlux Functional REST APIs

Centralized exception handling in reactive REST services avoids duplicating try/catch logic across handlers, produces consistent error payloads, and centralizes error code management. Single place to map exceptions to HTTP status codes and payloads Consistent JSON shape for all failures Cleaner hand...

Integrating RestTemplate with an OkHttp Connection Pool in Spring Boot

OkHttp provides an efficient HTTP stack for RestTemplate by reusing sockets across requests to the same host, pooling idle connections to cut latency, transparently compressing responses with GZIP, and retrying recoverable network failures. With TLS support (including SNI/ALPN) and IP failover on co...

Collecting Spring Boot Application Logs with Graylog

Spring Boot Log Aggregation with Graylog Graylog ovevriew Centralized log platform built around Elasticsearch for search/storage and MongoDB for configuration/state. Ingests logs via inputs such as GELF (UDP/TCP), Syslog, and more. Web UI and REST API exposed on port 9000 by default. Deployment with...

Spring Boot with MyBatis: Essential SQL Patterns Using Annotations

1. Project setup 1.1 Dependency Add MyBatis Spring Boot starter to pom.xml. <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.3.1</version> </dependency> 1.2 Data source configuratio...