报错信息为:
Unable to find a single main class from the following candidates [com.baiwang.custom.web.chengben.InvoiceManager, com.baiwang.custom.web.start.CustomApplication]

很明显是因为有多个main方法导致的。

但是又人会问,我代码里面有7,8个main方法,为什么都不报错呢。
是因为如果是静态类里面的main方法, 启动时没有装配在application中,那么就不会报错。
但是如果是在扫描或装配的范围内,就会报错。

方案: 去掉多余的main方法即可。