早上看到spring代碼中有有緩存bean的Map以下:
html
public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanRegistry {java
/** Cache of singleton objects created by FactoryBeans: FactoryBean name --> object */spring
private final Map<String, Object> factoryBeanObjectCache = new ConcurrentHashMap<String, Object>();緩存
若是想找到factoryBeanObjectCache 這個Map,可是FactoryBeanRegistrySupport 是抽象的,發現OQL這樣寫能夠查詢出來,仍是很是方便;jsp
SELECT s FROM INSTANCEOF org.springframework.beans.factory.support.FactoryBeanRegistrySupport s spa
這樣就查出來org.springframework.beans.factory.support.DefaultListableBeanFactory 這樣的對象,而後用outgoing refences 查看到對象中含有。.net
factoryBeanObjectCache 屬性;htm
OQL 還有不少高級用法,參考:對象
https://visualvm.java.net/oqlhelp.html
spring中有三種實例化bean的方式 http://www.cnblogs.com/killbug/p/3283382.html