The most violent way to get beans in spring

WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
wac.getBean(beanID);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326124152&siteId=291194637