Use correct bean type (FactoryBean instead of plain Factory) as well as the correct property (repositoryInterface).