Jersey Multiple Produces
<p>I am following the jersey tutorial <a href="https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2089" rel="noreferrer">here</a> to figure out how one would produce multiple mime outputs. From their website, this is the recommended way:</p>

<pre><code>@GET
@Produces({"application/xml", "application/json"})
    public String doGetAsXmlOrJson() {
    ...
}
</code></pre>

<p>What I cannot figure out is how to abstract the @Produces away, so that my code is more welcoming to additional mime types it can produce. Say for example I have 500 methods that all have this annotation:</p>

<pre><code>@Produces({"application/xml", "application/json"})
</code></pre>

<p>If I get a requirement to add kml as a mime type, editing and replacing all of those values would certainly be time consuming.</p>

<pre><code>@Produces({"application/xml", "application/json", "application/kml"})
</code></pre>

<p>Is it possible to architect @Produces more efficiently so that I do not have this issue down the road?</p>