You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support @Nullable annotations as indicators for optional injection points [SPR-15028] #19595
Along the lines of Guice (https://github.com/google/guice/wiki/UseNullable), we can easily detect @Nullable annotations and automatically mark method parameters and dependency descriptors as optional, i.e. not required, injecting null instead of throwing an UnsatisfiedDependencyException. This is particularly useful with JSR-330's @Inject where not @Autowired-style required attribute is available at the injection annotation level, as an alternative to using Java 8's java.util.Optional (which Spring supports for a while already). This also nicely goes along with our support for nullable type declarations in Kotlin.
Activity