Skip to content

Instantly share code, notes, and snippets.

@rmannibucau
Last active February 5, 2024 07:46
Show Gist options
  • Save rmannibucau/e14324cdfc278ad388f1 to your computer and use it in GitHub Desktop.
Save rmannibucau/e14324cdfc278ad388f1 to your computer and use it in GitHub Desktop.
import org.apache.openejb.testing.ApplicationComposers
import org.apache.openejb.testing.Classes
import org.apache.openejb.testing.EnableServices
import javax.ws.rs.GET
import javax.ws.rs.Path
@Grab("org.apache.openejb:javaee-api:7.0-SNAPSHOT")
@Grab("org.apache.openejb:openejb-cxf-rs:5.0.0-SNAPSHOT")
@Path("hi")
class Hi {
@GET
String hi() {
"Hi"
}
}
@EnableServices("jaxrs")
@Classes(Hi)
class Run {
}
ApplicationComposers.run(Run);
@melix
Copy link

melix commented Jan 24, 2015

A (small) improvement: you can remove the .class from Hi.class and Run.class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment