PDA

View Full Version : [SOLVED] Using SpringBeans?



fallenshadow
May 10th, 2012, 11:10 AM
Hey guys/gals,

Does anyone know how to use a springbean instead of using setters for the information?

For example instead of:


exampleDetails.setName("bob");

I want to use this for the details:


<bean id="Details" class="com.examplePackage.Details">
<property name="name" value="bob" />
</bean>


Thanks in advance!

r-senior
May 10th, 2012, 04:47 PM
That looks ok to me. Did you have a question -- or is this solved?

fallenshadow
May 12th, 2012, 11:09 AM
Yes I got this solved. My spring context file was not in the build path, so after moving it this worked. :)