eclipse-ee4j / eclipse-ee4j/jersey
Remove the explicit requirement for servlet API on spring-jersey
Open
Component: extensions
spring
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.