Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Use the new Ribbon API.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmcwhirter committed Dec 23, 2015
1 parent fb5846c commit f9cfb25
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] args) throws Exception {
JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "events.war" );
deployment.addPackage(Main.class.getPackage());
deployment.addAllDependencies();
deployment.as(RibbonArchive.class).setApplicationName("events");
deployment.as(RibbonArchive.class).advertise();
deployment.as(Secured.class)
.protect()
.withMethod( "GET" )
Expand Down
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) throws Exception {
JAXRSArchive deployment = ShrinkWrap.create( JAXRSArchive.class, "time.war" );
deployment.addResource(TimeResource.class);
deployment.addAllDependencies();
deployment.as(RibbonArchive.class).setApplicationName( "time" );
deployment.as(RibbonArchive.class).advertise();
deployment.as(Secured.class)
.protect()
.withMethod( "GET" )
Expand Down
Expand Up @@ -47,10 +47,10 @@ public static void main(String[] args) throws Exception {
});
container.fraction(fraction);

JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class);
JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "events.war");
deployment.addPackage( Main.class.getPackage() );
deployment.addAllDependencies();
deployment.as( RibbonArchive.class ).setApplicationName( "events" );
deployment.as( RibbonArchive.class ).advertise();
container.start().deploy(deployment);
}
}
Expand Up @@ -46,10 +46,10 @@ public static void main(String[] args) throws Exception {
c.stack( "udp" );
});
container.fraction(fraction);
JAXRSArchive deployment = ShrinkWrap.create( JAXRSArchive.class );
JAXRSArchive deployment = ShrinkWrap.create( JAXRSArchive.class, "time.war" );
deployment.addResource(TimeResource.class);
deployment.addAllDependencies();
deployment.as(RibbonArchive.class).setApplicationName( "time" );
deployment.as(RibbonArchive.class).advertise();
container.start().deploy(deployment);
}
}

0 comments on commit f9cfb25

Please sign in to comment.