spring custom bean factory for migration from other injection framework