java web程序启动自动运行方法(spring)

场景:将web项目部署到tomcat后,启动tomcat后自动运行程序重的某个方法。java 环境:spring、springmvcweb 直接新建一个controller类,让该类实现ApplicationListener<ContextRefreshedEvent>,实现该接口的 public void onApplicationEvent(ContextRefreshedEvent arg0
相关文章
相关标签/搜索