Are there any plans to support Spring bean configuration via Java 5 annotations (like Java EE 5) instead of separate XML configuration files (or some of the more recent alternatives)?
I realise there are some religious objections to source-level metadata, as this means adding extra dependencies to Spring. However such metadata items (annotations or commons attributes) can easily be subclassed in a project to avoid Spring-specific imports. And they are clearly of great use in defining transactions or controller URLs so why not Spring beans as well?
We're currently using Spring 1.2.x with XDoclet, as this allows spring beans to be very easily defined (on class definitions) and injected (on setters) and we never have the situation where the XML config gets out of step with the code (easy in a large project!).
We're looking to migrate to Spring 2.x and Java 5, and it would be great to replace the XDoclet definitions with type-safe annotation equivalents.
I'm sure I'm not the only Spring user to have these thoughts. If I looked into prototyping some sort of classpath-based start-up scanning of annotations, would I be wasting my time?
Thanks, Chris Nappin.


Reply With Quote
