users@jersey.java.net

[Jersey] configure com.sun.jersey.multipart.MultiPartConfig programmatically

From: Gehl, Pascal <Pascal.Gehl_at_nuance.com>
Date: Tue, 6 Sep 2011 11:32:12 -0400

Hi,

 

We're using jersey 1.8 in an embedded jetty.

We don't have a web.xml and we use a unique application configuration
file.

 

We instanciate all instances using spring and inject configuration
values using a spring propertyPlaceHolderConfigurer.

 

My question is how can I inject an instance of MultipartConfig that does
not require the jersey-multipart-config.properties file?

 

Or how can we inject my own MultiPartConfigProvider instance to replace
the default one so we are able to return our own instance of
MultipartConfig?

 

And even better how can we replace the instance of
MultiPartReaderClientSide/Server side so we can create more configurable
instances of MimeConfig?

 

Thanks in advance,

 

Pascal