ApplicationContext ctx = AppContext.getApplicationContext(); Honeypotbean honey = (HoneyPotBean) ctx.getBean("honey");