linkrest ex (#2647)

This commit is contained in:
lor6
2017-09-20 09:46:21 +03:00
committed by Grzegorz Piwowarek
parent 90a102ec47
commit 60acc2fd1d
13 changed files with 400 additions and 1 deletions
@@ -0,0 +1,24 @@
package com.baeldung;
import javax.ws.rs.ApplicationPath;
import org.apache.cayenne.configuration.server.ServerRuntime;
import org.glassfish.jersey.server.ResourceConfig;
import com.nhl.link.rest.runtime.LinkRestBuilder;
import com.nhl.link.rest.runtime.LinkRestRuntime;
@ApplicationPath("/linkrest")
public class LinkRestApplication extends ResourceConfig {
public LinkRestApplication() {
ServerRuntime cayenneRuntime = ServerRuntime.builder()
.addConfig("cayenne-linkrest-project.xml")
.build();
LinkRestRuntime lrRuntime = LinkRestBuilder.build(cayenneRuntime);
super.register(lrRuntime);
packages("com.baeldung.linkrest.apis");
}
}