我一直在使用的BeanPostProcessor有了Spring,我如何獲得具有特定實例的類的列表?
@Override
public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException
{
log.info("postProcessBeforeInitialization bean : " + beanName);
if (bean instanceof TestAware)
{
testaware.add(((TestAware) bean).getClass());
log.info("Added testAware bean : " + beanName);
}
return bean;
}
但問題試過了,還有哪些沒有bean定義一些類。 是否有任何替代或改進的方式獲得。 在此先感謝。
看一看[思考](https://code.google.com/p/reflections/) –
感謝您的建議,是沒有什麼辦法可對上述方法湊合。 – Abhilash