找不到需要把主类所在的java文件设置为Sources文件 idea才读取得到 步骤 打开file–project structure–Modules 将主类所在java文件夹设置为Sources 再次打开application设置,可以找到主类了