Hi,
We have a spring-jersey app. We use spring bean profiles for configuring various environments in our application. Its works great untill we tried adding a provider. We are using JacksonJsonProvider in our applicaton for modfying json output. But we want to use this provider in only one of our environments. So we tried plugging in the provider as per environment using spring bean profiles. we have something like this.

Code:
@Provider
@Profile("docs")
@Produces(MediaType.APPLICATION_JSON)
public class JacksonJsonProvider extends JacksonJaxbJsonProvider {
We just want to apply this provider when the profile is 'docs' . But this does not seem to work. The provider is being applied to all environments irrespective. Seems like @Provide and @Profile tags dont go well together.

Please let us know if there is any mistake in this or if there is a better way forward.

Thanking you.

regards,
Navin.