I asked a general Spring question: Auto-cast Spring Beans and had multiple people respond that calling Spring\'s ApplicationContext.getBean() should be avoided
ApplicationContext.getBean()
You should to use: ConfigurableApplicationContext instead of for ApplicationContext