原文地址::https://zhidao.baidu.com/question/1704581714638407700.html
相关文章
1、一个java文件为什么可以有两个main函数----https://zhidao.baidu.com/question/2120745906443829787.html
2、web项目没有main方法,怎么运行的?----https://blog.youkuaiyun.com/lyt_7cs1dn9/article/details/52469472
类中的main函数,在java web应用中,没有任何的作用,web应用启动是不会执行类中的main方法的,因为只会调用tomcat或者其它应用服务器的main,然后通过web.xml的配置去加载其它类,公司的java web项目的main方法,纯属测试用的。