Very helpful! Just in my case
getInjector()
is called before contextInitialized()
. This is bit odd, but still works!