Skip to content

Instantly share code, notes, and snippets.

@lance

lance/Main.java Secret

Created December 21, 2015 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lance/05a1496031ca25a88d20 to your computer and use it in GitHub Desktop.
Save lance/05a1496031ca25a88d20 to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws Exception {
Container container = new Container();
JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "swagger-app.war");
deployment.addClass(TimeResource.class);
deployment.addAllDependencies();
container
.fraction(LoggingFraction.createDebugLoggingFraction())
.fraction(new SwaggerFraction())
.start()
.deploy(deployment)
.deploy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment