错误原因 导入包错误。 将import org.apache.catalina.core.ApplicationContext;改为: import org.springframework.context.ApplicationContext;即可。 亲测运行成功!