extends spring factory to avoid cyclic dep,