Deprecated please go to https://github.com/google/auto/tree/master/service
This library helps you create service provider declaration file under the META-INF/services
directory. By adding a @Servcie
annotation onto your service implementation class, you will have the service provider declaration file generated at compile time.
The below code sample declares a GreetingService
implementation.
import org.taosha.nit.Service;
@Service(GreetingService.class)
public class EnglishGreetingService implement GreetingService {
@Override public void greet() {
System.out.println("Oh hello!");
}
}
If you are using gradle, add these two dependencies to your project:
repositories {
maven { url 'http://maven.taosha.org' }
}
dependencies {
provided 'org.taosha:nit:1.1'
}