Resolving Not Supported Exception for XML External DTD Access via SPI Mechanism

Problem Context During Fortify security scanning, XML External Entity Injection (XXE) vulnerabilities were detected in XML processing code. XXE attacks exploit dynamic document construction features in XML parsers. The remediation involved adding security configurations to prevent external entity inclusion in incoming XML documents. During the ...

Posted on Mon, 25 May 2026 18:57:15 +0000 by Enlightened

Understanding Java Service Provider Interface (SPI) Mechanism

The Service Provider Interface (SPI) is a powerful service discovery mechanism built into Java. It enables frameworks to discover and load service implemantations dynamically by scanning configuration files in the META-INF/services directory on the classpath. Many popular frameworks including Dubbo and JDBC leverage SPI to provide extensible ar ...

Posted on Sat, 23 May 2026 22:51:40 +0000 by whit3fir3

Understanding SPI and Its Role in JDBC Driver Loading

What Is SPI? SPI (Service Provider Interface) is a mechanism in Java that enables dynamic discovery of service implementations at runtime. It scans the META-INF/services/ directory on the classpath for files named after fully qualified interface names. Each file lists concrete implementation classes, allowing frameworks to load them without har ...

Posted on Fri, 22 May 2026 19:51:18 +0000 by vponz

Service Exposure Mechanism in Apache Dubbo

The URL as a Configuration BusPrior to analyzing the export mechanism, understanding the role of the URL in Dubbo is essential. Unlike standard web URLs, Dubbo utilizes the URL as its universal contract and configuration bus. A typical Dubbo URL follows this structure:scheme://user:secret@host:port/context?param1=val1&param2=val2Relying on ...

Posted on Sun, 17 May 2026 14:54:52 +0000 by m4rw3r

Understanding Lombok's Annotation Processing Mechanism

Introduction In recent projects, I've observed that many modern Java applications utilize Lombok, a library designed to automate the generation of boilerplate methods like getters, setters, and toString(). By simply annotating classes, developers can eliminate the need to manually write these repetitive methods. Lombok Setup Adding Dependency t ...

Posted on Wed, 13 May 2026 00:46:05 +0000 by rdimaggio

Implementing Plugin Architecture in Spring Boot Applications

Java Plugin Implementation Approaches ServiceLoader Mechanism Java's ServiceLoader provides a standard SPI implementation. Define an interface with multiple implementations, then load them dynamically: public interface NotificationService { void sendAlert(String message); } public class EmailNotifier implements NotificationService { @O ...

Posted on Sun, 10 May 2026 19:39:54 +0000 by dt_gry

A Practical Guide to SPI Driver Architecture and User-Space Programming in Linux

SPI Core Concepts SPI (Serial Peripheral Interface) is a synchronous, full-duplex serial communication protocol originally developed by Motorola. It enables MCUs or MPUs to exchange data with peripherals such as flash memory, ADCs, network controllers, or other processors. Key attributes include high-speed operation, serial data transfer, and t ...

Posted on Fri, 08 May 2026 18:50:31 +0000 by A584537

Implementing a Simplified Dubbo SPI Mechanism

Core Annotations (Simulating Dubbo) 1. @SPI Annotation (Marking Extension Interfaces) import java.lang.annotation.*; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface SPI { // Default extension name String value() default ""; } 2. @Adaptive Annotation (Simplified Adaptive Methods) import java.lang.annot ...

Posted on Fri, 08 May 2026 11:06:54 +0000 by bluejay002