Skip to content

Instantly share code, notes, and snippets.

@gabfssilva
Created March 12, 2015 02:12
Show Gist options
  • Save gabfssilva/366d2f39147da75ef416 to your computer and use it in GitHub Desktop.
Save gabfssilva/366d2f39147da75ef416 to your computer and use it in GitHub Desktop.
package org.apache.openejb.tomee.boot;
import javax.ejb.EJB;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
/**
* @author Gabriel Francisco - [email protected]
*/
@Path("/sample")
@ApplicationBoot(applicationName = "tomee-boot", basePackage = "org.apache.openejb.tomee.boot", port = 9090)
@EnableCDI
public class EndpointSample {
@Inject
private EJBExample ejbExample;
@GET
public Response get(){
return Response.ok(ejbExample.get()).build();
}
public static void main(String[] args) {
TomEEApplication.run(EndpointSample.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment