Skip to content

Instantly share code, notes, and snippets.

@anuragkapur
Last active August 29, 2015 14:05
Show Gist options
  • Save anuragkapur/2e24ab4029bf1637921d to your computer and use it in GitHub Desktop.
Save anuragkapur/2e24ab4029bf1637921d to your computer and use it in GitHub Desktop.
public class MyService extends Service<MyServiceConfiguration> {
@Override
public void initialize(Bootstrap<MyServiceConfiguration> bootstrap) {
bootstrap.setName("my-service");
}
@Override
public void run(AccessDropServiceConfiguration configuration, Environment environment) throws Exception {
environment.addResource(new AccessResource());
}
public static void main(String[] args) throws Exception {
new MyService().run(getDefaultedArgs(args, "my-service.yaml"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment