refactoring spring context