Created
February 27, 2009 23:26
-
-
Save cowtowncoder/71771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.util.*; | |
import javax.ws.rs.core.*; | |
public final class RestJsonApplication | |
extends Application | |
{ | |
public Set<Class<?>> getClasses() | |
{ | |
// Need to add resource(s); in this case Echo handler | |
HashSet<Class<?>> resources = new HashSet<Class<?>>(); | |
resources.add(EchoName.class); | |
return resources; | |
} | |
public Set<Object> getSingletons() | |
{ | |
HashSet<Object> singletons = new HashSet<Object>(); | |
// Need provider for JSON: (aside from standard yucky badgerfish thingy) | |
singletons.add(new JsonProvider()); | |
return singletons; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment