How to set Class value to spring bean property?
Just supply the class name. Say you want clazz
to be String.class
:
<bean id="beanId" class="FilterJsonView"> <property name="clazz" value="java.lang.String"/></bean>
Spring has a PropertyEditorSupport
implementation called ClassEditor
that handles the conversions.