I would like to create a Spring Bean of a Inner class. If I have the following inner class B:
package x.y.z;
public class A {
public class B { }
}
I would like to create bean instance in my XML configuration files.
<bean class="x.y.z.A.B" name="innerBean" />
You cannot access your public static inner class with the dot (
.) notation, instead, use the currency ($). An example:This will work.