1. Introduction to SPI
This article introduces Java's Service Provider Interface (SPI) mechanism, explaining its role in decoupling interface definitions from implementations, with examples in JDBC, Spring Boot, and Dubbo.
0 views collected around this technical thread.
This article introduces Java's Service Provider Interface (SPI) mechanism, explaining its role in decoupling interface definitions from implementations, with examples in JDBC, Spring Boot, and Dubbo.
This article explains Java's Service Provider Interface (SPI) mechanism and compares it with Dubbo's enhanced SPI implementation, highlighting how Dubbo addresses the limitations of native Java SPI through configuration format changes and lazy loading.
This article explains how to develop, package, and deploy custom Trino plugins—illustrated with an access‑control plugin—by using Java SPI, Maven dependencies, implementing the Plugin and SystemAccessControl interfaces, and configuring the plugin in Trino’s configuration files.
The article introduces mica-auto, a Spring Cloud component that uses annotation processing to automatically generate starter configurations, SPI entries, and Feign client setups, and provides usage examples for Maven and Gradle along with recent updates.
The mica-auto component of the Mica Spring Cloud framework provides a set of tools that automatically generate essential Spring Boot starter files such as spring.factories, spring‑devtools.properties, and Java SPI configurations, simplifying multi‑module backend projects and supporting annotations like @AutoService for seamless integration.
Java’s Service Provider Interface (SPI) is a built‑in discovery mechanism that decouples implementation from usage by letting providers place fully qualified class names in META‑INF/services files, enabling frameworks such as JDBC, logging, and Dubbo to load multiple vendor implementations at runtime via ServiceLoader, though it has limitations like lack of on‑demand loading and concurrency issues.