Hi,
I have implemented BeanNameAware Interface and i am trying to access the bean using ApplicationContext.There i am getting exception $Proxy0 cannot be cast to net.springtest.SimpleBean. I am new to Spring framework.I have read that applicationcontext provides all the features that bean factory has.But here i am able to load the bean using BeanFactory but not ApplicationContext. Can you please describe what exactly proxy meant here and in what situations we should use bean factory and applicationContext. Appreciate your Help.
Yes indeed you are using AOP. In that case you'll have to create a base interface of SimpleBean class and use that interface as reference when you get the simpleBean from ApplicationContext...