Skip to content
/ nit Public

Generate META-INF/services/some.service.Implementation file

Notifications You must be signed in to change notification settings

taosha/nit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
}

About

Generate META-INF/services/some.service.Implementation file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages