Inner classes in spring