Spring with Stripes

compared with
Current by DJDaveMark
on Jun 19, 2009 17:46.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View Page History
{code}

then Stripes will first attempt to auto-wire by name, and then by type. First the name of the desired bean is derived from the method name - if the method name starts with 'set' then it is removed and the next character down-cased (following standard JavaBean rules), otherwise the entire method name is taken verbatim. In the example above this yields {{bugManager}}. The Spring context is then queried to see if it contains a bean called {{bugManager}}. This query is case insensitive and path insensitive, resulting in a match to the {{/bugzooky/BugManager}} bean in the example above.

If the context does not contain a bean with a matching name then auto-wiring by type is a last ditch effort. In this case if a single bean exists in the context that is of the type required by the annotated method ({{BugManager}} in this case) then that bean will be selected and injected into the ActionBean.