public static < T > T getBean ( ApplicationContext appContext , String id , Class < T > clazz ) { try { return appContext . getBean ( id , clazz ) ; } catch ( BeansException e ) { return null ; } }
Gets a bean by its id and class .