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.

The example in chapter 6 of the Reference Manual is complete. factory-method is an IoC container feature, telling Spring to call a static method to obtain an instance of the class to apply Setter Injection to.

Adrian's blog was written before we added this feature, specifically to support AspectJ (although it's also useful in some other cases).

Uses factory-method="aspectOf" you cause the IoC container to get the instance of a singleton aspect. It can then apply Dependency Injection to it, configuring how it will subsequently behave.