spring-guice
spring-guice copied to clipboard
Log warning when GuiceModuleMetadata skips types due to visibility
SpringModule filters types that are not visible. However, when this happens, Guice will attempt to construct the type on its own using just in time bindings. This usual leads to strange behaviors, such as singletons being instantiated by both Guice and Spring. Suggest at least logging a warning to make people aware that SpringModule will not be passing the binding to Guice when the type is not visible.
https://github.com/spring-projects/spring-guice/blob/master/src/main/java/org/springframework/guice/module/GuiceModuleMetadata.java#L141