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

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



We're using jersey 1.8 in an embedded jetty.

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


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 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


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,