I personally think that the Java configuration option for Spring is a very clever move of Rod and Co. Since reading Rod’s post and playing around with the new configuration approach, I thought it would be very nice if Spring IDE could bring the two worlds-XML and Java configuration-together and seamlessly support the user with content assist, navigation support and graphical visualization of bean definitions across both configuration styles.
Today I implemented an extension prototype for Spring IDE’s internal bean definition parsing to see if it is possible to support the annotation style. Thanks to Torsten’s core abstraction on top of Spring’s bean definitions and Eclipse’ internal Java model, I was able to parse the required meta information from a Java class which is annotated with @Configuration.
The code is not meant to be production ready, but serves as a proof-of-concept for us.
Above you can see an sample @Configuration class that defines three Spring beans: stefanie, rod, house The annotation-style beans are decorated with an @ icon in the Spring Beans view.
By leveraging Eclipse’ AST support I was able to parse the dependencies between different Spring beans from the Java code. For example the expression person.setHouse(house()); defines a dependency between the person and house bean. Even the reference to XML-configured bean-resolved by person.setHouse((House) getBean("company"));-can be extracted from the source code.
Therefore Spring IDE is able to bring up a Beans Graph for the sample that outlines the dependencies between Java and XML-configured beans.
Let me know what you think and if you want to see that support in Spring IDE 2.0. I will provide a download of the prototpye to play around with after some more testing.






Recent Activity
David Newcomb, David Newcomb, Novice, , Shaun, PrakSub, Christian Dupuis, painfulupdate, Scott, Christian Dupuis [...]
Sweepstakes, Ashley Wong, Alessandro, Reza Payami, Christian Dupuis, Senthil, Chris B, Christian Dupuis, Senthil, Christian Dupuis [...]
Paa, Daniel, electronic cigarette, suzan, Millen Store, Ralf Ebert, tek, Axel Mendoza Pupo, Christian Dupuis, Ryan Ovrevik [...]
thygu, Ralf Ebert, Haya, Tony, James, Radek, Radek, jack, nicholas, cj [...]
abc, bruno, Pat, John, joshmerry, IGC, guddu, antonio, Narada, Rakesh [...]
, Barry Smittins