PDA

View Full Version : BeanNameAutoProxyCreator configuration and use


vramanlal
Sep 14th, 2004, 03:07 AM
I am trying to use the BeanNameAutoProxyCreator to apply some interceptors to all beans in a given context.

However I cannot get it to work. I must be doing something wrong.

Can someone send me a sample configuration file.

Also am I correct in assuming that the code using the bean factory will not need to change and can use the bean names it did previously (i.e. when no interceptors were applied).

Regards
Vikash

Alef Arendsen
Sep 14th, 2004, 10:01 AM
Did you have a look at the reference manual (sect. 5.10: http://www.springframework.org/docs/reference/aop.html#aop-autoproxy). There are a couple of example there).

And yes you're right, you don't need to change anything, the bean names will stay the same, except for the fact that they're advised now.

vramanlal
Sep 14th, 2004, 06:09 PM
Found my issue.

I was using XmlBeanFactory when I should have been using an ApplicationContext.