Confluence Docs 3.0 : How do I autowire a component? This page last changed on Jan 24, 2006 by jnolen. ### Cannot resolve external resource into attachment. How do I autowire a component? Most of the time, you don't have to. All plugins will have their 'primary' objects (The macro in a macro plugin, the XWork actions in an XWork plugin, the RPC handler in an RPC plugin and so on...) autowired. If you want to write an arbitrary object that is autowired, but that is not any particular plugin type itself, write a Component Plugin Module. The added advantage of this is that Confluence will then autowire other plugins with the component you have just written. If, however, you find you need to autowire an arbitrary object with Spring components, use `bucket.util.ContainerManager`
    bucket.container.ContainerManager.autowireComponent(myObject);
Where `myObject` is the object instance that you wish to be autowired.

Document generated by Confluence on Nov 05, 2009 23:34