This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

aop:config conflicting with annotation based autowiringPage Title Module

I'm using a combination of @Component, @Service and @Repository annotations plus <context:component-scan ... /> config to wire up my application. I use @Autowired for constructor injection. Spring version is 2.5.1.

Until I tried to introduce an aspect into the mix things were working well. As soon as I introduce the <aop:config stuff my app tells me I have unsatisfied dependencies in beans far removed from the stuff i'm trying to auto proxy. In fact I only have to introduce the following for it to break...

<aop:config>

</aop:config>

I don't know exactly how this config effects the loading of bean definitions. I'm assuming it must introduce some proxying and this is conflicting with the autwiring and component scanning.

Another observation is this...

If I try configuring it using a ProxyFactoryBean I get identical behaviour.