default-autowire="byType" only resolves fully-qualified type?

17 views
Skip to first unread message

Henry Ho

unread,
Jan 13, 2010, 9:06:50 PM1/13/10
to ColdSpring-Users
If I have a Xxx.cfc in /com/model, and if the argument type is just
type="xxx" instead of "com.model.xxx", the property is ignored when
default-autowire="byType".

Is it possible to make the relative type works as well?

Thanks
Henry

Brian Kotek

unread,
Jan 13, 2010, 9:54:40 PM1/13/10
to coldspri...@googlegroups.com
Wouldn't this only matter if every bean you're autowiring is in the same directory? Otherwise, you'd need to specify the full path as the type anyway. And having everything in one folder seems like a pretty bad idea for a lot of reasons.

The only real choice would be to loop through the definitions and use the first one it runs into that matches the CFC name, regardless of the path. I'm just not sure I would like that option, it seems pretty risky. But if you want to add it in the meantime, you'd just need to modify the code in findBeanNameByType to match on the CFC name and not the full path.

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.




Reply all
Reply to author
Forward
0 new messages