javaee / jersey

This is no longer the active Jersey repository. Please see the README.md

Home Page:http://jersey.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove the explicit requirement for servlet API on spring-jersey

trajano opened this issue · comments

In SpringComponentProvider it makes an explicit reference to ServletContext.class

        ServletContext sc = injectionManager.getInstance(ServletContext.class);

        if (sc != null) {
            // servlet container
            ctx = WebApplicationContextUtils.getWebApplicationContext(sc);

However, we should be able to embed Jersey with Spring on a non-servlet context. I tried to remove it myself, but I didn't want to recreate the other parts of it like the AutowiredInjectResolver but using the ext package forces the provider to be loaded.