Automatically close Spring context.