Fading Coder

One Final Commit for the Last Sprint

Serving Static Assets in Spring Boot Applications

Spring Boot provides convenient ways to handle static resources such as images, JavaScript files, and CSS stylesheets. When packaging your application, Spring Boot automatically includes certain directories and excludes others. Default included directories: public/**, resources/**, static/**, templ...

Integrating Redis with Spring Boot Applications

Redis Cleints in Java In Java applications, interacting with Redis requires a Redis client library, similar to using JDBC for MySQL operations. Several reliable Java clients are available: Jedis Lettuce Spring Data Redis Spring provides comprehensive integration through Spring Data Redis, and Spring...

Configuring Server-Side View Rendering with ModelAndView in Spring Boot

Enabling server-side view rendering in Spring Boot requires configuring a view resolver that maps logical names returned from controllers to physical template files. The setup involves updating project dependencies, adjusting the application entry point for external container compatibility, defining...

Implementing Role-Based Access Control with Spring Security in a Spring Boot Application

1. Required Dependencies Add the following to your pom.xml: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.thymeleaf.extras</groupId> <arti...

Configuring Multiple Data Sources in a Spring Boot Application

Configuring Multiple Data Sources in Spring Boot To support heterogeneous database access—such as reading from both MySQL and PostgreSQL—Spring Boot applications can be configured with multiple data sources using dynamic routing. Dependency Setup Add the following dependencies to pom.xml: <depend...

Establishing Full-Duplex Real-Time Connections Using WebSocket and Spring Boot

Protocol Fundamentals WebSocket defines a standardized method for opening persistent, bidirectional channels over a single Transmission Control Protocol (TCP) socket. After an initial negotiation phase, both the client and backend can independently exchange data streams without adhering to tradition...

Essential Configuration Changes When Upgrading to Spring Boot 2.x

Redis Connection Factory Configuration Spring Boot 2.x introduces significant changes to Redis auto-configuration. The Jedis client setup requires explicit bean definitions with updated APIs. Required Dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactI...

Understanding Spring Boot Core Concepts and Autoconfiguration

Spring is an open-source, full-stack Java framework centered around inversion of control and aspect-oriented programming. While its foundational abstractions are applicable across any Java application, Spring has evolved extensively to support enterprise web development—largely supplanting legacy EJ...

HTTP POST Implementation for Sending Array Parameters with Java and Spring

When developing client applications that need to transmit collections of data to a server endpoint, utilizing an HTTP POST request is the standard approach. Specifically, scenarios involving batch operations often require sending an array of identifiers or objects. To handle this on the client side...

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...