fixed issue:ApplicationContext should never closed.