sample:
Class itemClass;
public Class getItemClass() {
return itemClass
}
public void setItemClass(Class itemClass) {
this.itemClass = itemClass;
}
Now inject itemClass property in spring:
<bean id="shampoo" class="com.test.Product">
<property name="itemClass">
<value type="java.lang.Class">com.myproducts.Shampoo</value>
</property>
</bean>
it should work.
标签:myproducts,itemClass,spring,public,how,inject,type,Class From: https://blog.51cto.com/u_6174294/6207211