I inject Strings in my spring config by doing the following:
<bean class="java.lang.String">
<constructor-arg type="java.lang.String" value="Region" />
</bean>
Is there a shorter way of doing it?
Update: I am using spring 3.0.3.
These are actually used to populate a list:
<list>
<bean class="java.lang.String">
<constructor-arg type="java.lang.String" value="Region" />
</bean>
...
Seems like this works:
<list>
<value>Region</value>
<value>Name</value>
....
But I agree with the suggestions that this should eventually go in a property and be passed in.
value="Region"
in place of this bean?