Injecting ServletContext while not using GuiceServletContextListener leads to logspam
Open
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
GuiceServletContextListener is optional per the [docs](https://github.com/google/guice/wiki/ServletModule):
Note that it is not necessary to use a ServletContextListener to use Guice Servlet, as long as you remember to install ServletModule when creating your injector.
However if one does this (installing a ServletModule in a manually-created injector) then injecting ServletContext at request-time leads to a [warning](https://github.com/google/guice/blob/master/extensions/servlet/src/com/google/inject/servlet/InternalServletModule.java#L68) as if we were injecting it at singleton-creation-time.
This is because the BackwardsCompatibleServletContextProvider relies on GuiceServletContextListener to give it the current injector.
Contributor guide
Assessment
This issue has not been assessed yet.