# Independent Service Provider Interface **Repository Path**: bootable/spi ## Basic Information - **Project Name**: Independent Service Provider Interface - **Description**: No description available - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-06-19 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # An alternative for SPI Special thanks to [Apache Dubbo](https://github.com/apache/dubbo.git)! This repository is built based on `apache-dubbo`. The goal for this project is providing an independent lightweight `SPI` framework with features that has already been implemented in `dubbo`. ## Usage Just put `spi-spring` into your `pom.xml` as following: ```xml com.gitee.booting spi-spring VERSION ``` > Please check [release](https://gitee.com/booting/spi/releases) for list of `VERSION`s. To make it work, you can define your own `@SPI` interface for extension, for example: ```java package com.gitee.booting.intf; @com.gitee.booting.extension.SPI public interface IHandler { } ``` Then you can provide an implementation of `IHandler` as following: ```java package com.gitee.booting.impl; public class Handler implements IHandler { } ``` To expose this implementation, you need to put a `service` named as `com.gitee.booting.intf.IHandler` into `META-INF` with following content: ```text com.gitee.booting.impl.Handler ``` You can also specify a name for your implementation. Multiple implementations optional with names in one file is also possible: ```text handler1=com.gitee.booting.impl.Handler1 handler2=com.gitee.booting.impl.Handler2 ``` Content after a comma `#` will be treated as comment. ## How to make a contribute? - `fork` this repository - Do whatever update as you will - Commit your changes - Create a new merge request - No more action is required