refactoring on the spring configurations