use of jersey-cdi
This commit is contained in:
parent
2465ed3741
commit
7a9edfa796
18
pom.xml
18
pom.xml
|
@ -122,20 +122,10 @@
|
|||
<artifactId>jersey-media-multipart</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- weld -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>javax.enterprise</groupId> -->
|
||||
<!-- <artifactId>cdi-api</artifactId> -->
|
||||
<!-- <version>1.2</version> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.jboss</groupId> -->
|
||||
<!-- <artifactId>jandex</artifactId> -->
|
||||
<!-- <version>1.2.2.Final</version> -->
|
||||
<!-- </dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.ext.cdi</groupId>
|
||||
<artifactId>jersey-cdi1x</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger -->
|
||||
|
||||
|
|
|
@ -23,19 +23,9 @@ public class SDIService extends ResourceConfig{
|
|||
//
|
||||
public SDIService() {
|
||||
super();
|
||||
packages("org.gcube.spatial.data");
|
||||
// packages("org.gcube.spatial.data.sdi.model");
|
||||
// register(io.swagger.jaxrs.listing.ApiListingResource.class);
|
||||
// register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
|
||||
register(MultiPartFeature.class);
|
||||
// register(MoxyXmlFeature.class);
|
||||
log.warn("Initializing App : Properties.. ");
|
||||
ApplicationContext context=ContextProvider.get();
|
||||
ContainerConfiguration configuration=context.container().configuration();
|
||||
|
||||
|
||||
String hostName=configuration.hostname();
|
||||
Integer port=configuration.port();
|
||||
|
||||
try{
|
||||
URL resourceUrl = context.application().getResource("/WEB-INF/config.properties");
|
||||
LocalConfiguration.init(resourceUrl).
|
||||
|
@ -51,6 +41,38 @@ public class SDIService extends ResourceConfig{
|
|||
|
||||
|
||||
|
||||
packages("org.gcube.spatial.data");
|
||||
|
||||
|
||||
// log.warn("Initializing App : Binders");
|
||||
//
|
||||
// AbstractBinder binder = new AbstractBinder() {
|
||||
// @Override
|
||||
// protected void configure() {
|
||||
// bindFactory(SDIManagerImpl.class).to(SDIManager.class);
|
||||
// bindFactory(CapabilitiesProviderFactory.class).to(CapabilitiesProvider.class);
|
||||
// bindFactory(PersistenceProviderFactory.class).to(PersistenceProvider.class);
|
||||
// bindFactory(PluginManagerFactory.class).to(PluginManager.class);
|
||||
// bindFactory(RequestManagerFactory.class).to(RequestManager.class);
|
||||
// bindFactory(TicketManagerFactory.class).to(TicketManager.class);
|
||||
// }
|
||||
// };
|
||||
// register(binder);
|
||||
|
||||
|
||||
|
||||
register(MultiPartFeature.class);
|
||||
// register(MoxyXmlFeature.class);
|
||||
|
||||
|
||||
|
||||
// String hostName=configuration.hostname();
|
||||
// Integer port=configuration.port();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//SWAGGER
|
||||
// BeanConfig beanConfig = new BeanConfig();
|
||||
|
|
Loading…
Reference in New Issue