List of usage examples for org.springframework.context ApplicationContext isPrototype
boolean isPrototype(String name) throws NoSuchBeanDefinitionException;
From source file:kzht.gm.springframework.extension.context.PrototypeBeanInitializeListener.java
private void initializeAspectJWorld(ApplicationContext ctx) { if (ctx == null) { return;/*w w w . ja v a2 s. c o m*/ } if (LazyBeanDocumentReader.loadLazyInitAttr()) { return; } for (String name : ctx.getBeanDefinitionNames()) { if (ctx.isPrototype(name)) { try { // AspectJExpression ??? AspectJ ???? ctx.getBean(name); } catch (BeansException e) { // ApplicationContext ???????????????? // Prototype() ? Prototype() ?????????? // ? ApplicationContext ?????????????????? // ?????????? } } } }