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
* Added SpiServiceLocators to support multiple SpiServiceLocator annotations on package-info.java
* Added SpiServiceLocators to support multiple SpiServiceLocator annotations on package-info.java
* Test for multiple SpiServiceLocators
* ServiceLocator templated refactored for JDK8
* Added prerequisites to README.md
* bump jdk to version 8
Co-authored-by: Tobias Stamann <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,13 @@
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
@@ -76,12 +79,13 @@ To create multiple service locators in the same package use @SpiServiceLocators:
Just add a Service annotation to your service implementation:
@@ -97,7 +101,7 @@ Just add a Service annotation to your service implementation:
97
101
Service annotations mandatory value must declare the SPI you want the service class to be registered to.
98
102
All other annotation attributes are optional.
99
103
100
-
- 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.
101
105
- description declares a short description about the implementation
102
106
- priority is used to define a specific order in which the services are located
0 commit comments