You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,19 @@
7
7
# Why you should use this project?
8
8
9
9
If you want to use a service provider interface (_SPI_) you need to register your service implementation in the _/META-INF/services/<Full qualified spi interface name>_ file.
10
-
Additionally you usually need to write a service locator to be able to use the service implementation.
10
+
Additionally, you usually need to write a service locator to be able to use the service implementation.
11
11
12
12
The annotation processor offered by this project provides exactly this. It allows you to create the service locator file just by adding an annotation to you spi implementation.
13
-
Additionally it will generate a service locator for you.
13
+
Additionally, it will generate a service locator for you.
14
+
15
+
# Prerequisites
16
+
- The generated ServiceLocator code requires at least JDK 8.
14
17
15
18
# Features
16
19
Annotation processor that
17
20
- provides support for generating service locator file in _/META-INF/services/<Full qualified spi interface name>_
18
21
- provides support for generating service locator class for accessing the SPI implementations
22
+
- compatible with Java >= 8 (Java 7 support up to version 0.8.2)
19
23
20
24
# How does it work?
21
25
@@ -75,12 +79,13 @@ To create multiple service locators in the same package use @SpiServiceLocators:
Just add a Service annotation to your service implementation:
@@ -96,7 +101,7 @@ Just add a Service annotation to your service implementation:
96
101
Service annotations mandatory value must declare the SPI you want the service class to be registered to.
97
102
All other annotation attributes are optional.
98
103
99
-
- id defines a custom id which can be used to locate a specific servics implementation via the generated service locator class. Defaults to fully qualified service class name in generated service locator.
104
+
- id defines a custom id which can be used to locate a specific services implementation via the generated service locator class. Defaults to fully qualified service class name in generated service locator.
100
105
- description declares a short description about the implementation
101
106
- priority is used to define a specific order in which the services are located
0 commit comments