Use the dao in the factory and make it a bean