|
From: Magnus H. <ma...@fi...> - 2005-06-17 06:17:05
|
> I like the ideas of attributes to help the container perform > some of my work for me. That is, I'm already asking the > container to inject my dependencies. It's logical (to me) to > also ask the container to let me know if I've misconfigured > the dependencies somehow. This is the main reason why I want this too. Spring reminds me if I try to inject something that doesn't have a setter, I want it to tell me when I forget to inject something too. I don't want to pollute afterPropertiesSet with these kind of things. And even if I did, I probably would forget to add checks for some attributes at some point. It's more easy to remember to add something at the source, with an annotation imho. > You bring up good points. I don't think the annotations > method is perfect for all cases, but I do think it handles I agree. One size does not fit all. Things like this would fit nice in a Spring Wiki Cookbook though... /Magnus |