spring-guice icon indicating copy to clipboard operation
spring-guice copied to clipboard

Log warning when GuiceModuleMetadata skips types due to visibility

Open twicksell opened this issue 7 years ago • 0 comments

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

twicksell avatar Feb 22 '18 15:02 twicksell