io.swagger.jersey.config.JerseyJaxrsConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
package io.swagger.jersey.config;
import io.swagger.jaxrs.config.DefaultJaxrsScanner;
import io.swagger.jaxrs.config.ReaderConfigUtils;
import io.swagger.jaxrs.config.WebXMLReader;
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServlet;
public class JerseyJaxrsConfig extends HttpServlet {
@Override
public void init(ServletConfig servletConfig) throws javax.servlet.ServletException {
super.init(servletConfig);
servletConfig.getServletContext().setAttribute("reader", new WebXMLReader(servletConfig));
servletConfig.getServletContext().setAttribute("scanner", new DefaultJaxrsScanner());
ReaderConfigUtils.initReaderConfig(servletConfig);
}
}