Created
April 10, 2015 13:35
-
-
Save tomdwaggy/e84a876cd5e1e615a44b 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 io.github.arven.rs.services.example; | |
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.inject.Inject; | |
import javax.ws.rs.ApplicationPath; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.Application; | |
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; | |
import com.wordnik.swagger.jaxrs.listing.ApiListingResource; | |
import com.wordnik.swagger.jaxrs.listing.SwaggerSerializers; | |
import io.github.arven.flare.rs.JacksonJaxbYamlProvider; | |
import io.github.arven.flare.rs.Jsr250AuthorizationRequestFilter; | |
@ApplicationPath("/v1") | |
public class MicroBlogApplication extends Application { | |
@Inject private MicroBlogRestResource restService; | |
@Produces | |
@Override | |
public Set<Class<?>> getClasses() { | |
System.out.println(">>>>>>>>>>>>>>>>> GETTING RESOURCES"); | |
return new HashSet<Class<?>>( | |
Arrays.asList( | |
Jsr250AuthorizationRequestFilter.class, | |
JacksonJaxbJsonProvider.class, | |
JacksonJaxbYamlProvider.class, | |
SwaggerSerializers.class, | |
ApiListingResource.class | |
) | |
); | |
} | |
@Produces | |
@Override | |
public Set<Object> getSingletons() { | |
System.out.println(">>>>>>>>>>>>>>>> GETTING SINGLETONS " + restService); | |
return new HashSet<Object>( | |
Arrays.asList( | |
restService | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment