I am a new to spring. I have a bean class with a constructor having single parameter, a uniqueId.
void Sample(String uniqueId){
this.uniqueId = uniqueId;
}
the bean doesn't have any default constructor. I require this id for some bussiness logic. this uniqueID needs to be UUID.randomUUID().toString().
How can pass this to the bean from the bean configuration xml.
<bean id="Sample" class="com.scribe.dao.Sample">
<constructor-arg value="UUID.randomUUID().toString()"/>
</bean>
this doesn't work. What are my other options?
I have also seen an example like this in another post on stackoverflow.<constructor-arg value="uniqueId"/>
but the same didnot work for me.Is there any easyway to do this.
any help appreciated.