Using spring DI for providing mock data
Im new to spring, In my program Im using JSF+ spring integration and for
the UI testing I need to make mock datas(by not using database).I am going
to use spring's Dependency injection for this. This is my data,
Vehicle ID --- veh101, veh102,veh103
Vehicle Type --- car, bus, bike
Vehicle color --- Red, blue, white
veh101, car, red are description of a single object. I have created a bean
class 'VehicleBean' with properties - vehicleId,vechicleType and
vechicleColor
in the xml, I have given,
<bean id="VehicleBean" class="com.Vechicle.components.VechicleBean"
scope="request">
<property name="vehicleId" value="veh101" />
<property name="vechicleType" value="car" />
<property name="vechicleColor" value="Red" />
</bean>
These values are to be accessed in the UI by #{value} so how do I
refer/create objects for the rest of it,veh102 and veh 103?
Thanks in advance
No comments:
Post a Comment