History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-20112
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Avdeev
Reporter: Dave Griffith
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Automatically create Spring bean wirings

Created: 26 Jun 07 18:41   Updated: 10 Aug 07 13:12
Component/s: J2EE.Spring
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,027


 Description  « Hide
It should be possible for IDEA to automatically create wirings, for properties for which there is only one correctly-typed bean in scope (a very common occurence). This could either be on a per-property basis (picture an intention that says "Bind datasource property to oracleDataSource bean"), or in batch (an intention that just says "Wire up available properties").

How it should work is:
You create a bean, setting it's class (or factory, etc.). An intention is then available on the bean which says "Autowire properties". Any setters which can be unambiguously bound in the current context have their properties automatically added to the bean configuration. Constructor args are more difficult, since all of the args for a constructor have to be unambiguously bindable, but it's still doable. It's totally sweet to see a half-dozen property bindings added at a stroke, and the requirements for unambiguousness are very common. Basically, you get all of the ease-of-use of runtime auto-wiring with none of the scariness.

I had this in my personal Spring plugin, and it ruled.



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Avdeev - 10 Aug 07 13:12
You can do the same by "Generate properties" action, but an intention would be useful too.