java - Spring passing Class<?> through constructor from xml file -
is possible inject class param through constructor xml file? how done? example
public server(class<?>... configuration) {} this class param inject
this xml file
<constructor-arg index="0"></constructor-arg> but shall next?
if parameter of type class<?>, need provide qualified class name
<constructor-arg index="0">java.lang.string</constructor-arg> but since have varargs, need add <array> values
<constructor-arg index="0"> <array> <value> java.lang.string </value> </array> </constructor-arg>
Comments
Post a Comment