Spring without XML

Rod Johnson blogs about an interesting new Spring feature: POJO configuration. It allows to configure the Spring dependency injection using a separate Java class with some annotations. This basically solves two problems. First, there is more coding support from the IDE tool (refactoring, code completion, code navigation). It also presents a solution to the "I-hate-XML-configuration" people: just code some Java instead!

The solution presented seems pretty clean. I hope the implementation will allow the same flexibility as the XML configuration. The blog post kind of hints that a mix of XML and Java will be necessary in some cases. To me, one of the Spring strengths is the one configuration to bind them all. Mixing technologies would diminish the Java strengths (refactoring would still not work 100%) and would just make stuff more complex. It will be interesting to see the final capabilities of this new option once it leaves the sandbox. I hope it will provide a full zero-XML option, just like Java EE 5!