How to create a Spring Bean of an Inner class?