Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://tomee.apache.org/examples-trunk%2Frest-example-with-application%2FREADME.md
Index: trunk/content/examples-trunk/rest-example-with-application/README.md
===================================================================
--- trunk/content/examples-trunk/rest-example-with-application/README.md
(revision 1592131)
+++ trunk/content/examples-trunk/rest-example-with-application/README.md
(working copy)
@@ -10,9 +10,13 @@
import java.util.HashSet;
import java.util.Set;
+ //declaring an application-scoped base URI as "/rest-prefix" for every
other resources in the JAX-RS application identified by their respect "@Path"
annotations
+
@ApplicationPath("/rest-prefix")
public class ApplicationConfig extends Application {
public Set<Class<?>> getClasses() {
+
+ //Identifying resources for this example are instances of
"SimpleRESTPojo" and "SimpleRESTEJB""
return new HashSet<Class<?>>(Arrays.asList(SimpleRESTPojo.class,
SimpleRESTEJB.class));
}
}
@@ -28,6 +32,8 @@
@Singleton
@Lock(LockType.READ)
+
+ //Identifying SimpleRESTEJB class as a resource for this JAX-RS
application thru the resource URI - "/ejb"
@Path("/ejb")
public class SimpleRESTEJB {
@GET
@@ -42,6 +48,7 @@
import javax.ws.rs.Path;
import java.util.Date;
+ //Identifying SimpleRESTPojo class as a resource for this JAX-RS
application thru the resource URI - "/pojo"
@Path("/pojo")
public class SimpleRESTPojo {
@GET