Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. import javax.ws.rs.ApplicationPath;
  2. import javax.ws.rs.core.Application;
  3. import java.util.HashSet;
  4. import java.util.Set;
  5.  
  6. //Defines the base URI for all resource URIs.
  7. @ApplicationPath("/")
  8. //The java class declares root resource and provider classes
  9. public class MyApplication extends Application{
  10.     //The method returns a non-empty collection with classes, that must be included in the published JAX-RS application
  11.     @Override
  12.     public Set<Class<?>> getClasses() {
  13.         HashSet<Class<?>> h = new HashSet<Class<?>>();
  14.         h.add( ServiceMapLocation.class );
  15.         return h;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement