eclipse-ee4j / eclipse-ee4j/jersey

Remove the explicit requirement for servlet API on spring-jersey

Open
#3,684 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.