close Spring context properly