|
From: Colin S. <col...@ex...> - 2005-03-27 14:31:25
|
Rob Harrop wrote: > Just seen this post on the forum: > http://forum.springframework.org/viewtopic.php?t=4350 and I think it > would be a really good idea if you could use Java language semantics > for numbers inside the configuration file. So, for example, you can > specify 3000L and have it be a Long rather than an Integer. This is > much simpler than the current solution. Rob, How is this really supposed to work in terms of implementation though? Keep in mind right now the values are Strings, and then a PropertyEditor takes care of converting to the target type (when directly setting a property). How is Spring supposed to know that this is going to be a target Long, as opposed to just a string, given that what is being set is of type Object? On the other hand, the value element does have a 'type' attribute, so this can be specified for this case: <value type="java.lang.Long">30000</value> Colin |