我在春季项目中工作,我刚从我的 PM 那里得到项目,当项目尝试运行时出现此错误
Main class name has not been configured and it could not be resolved
该项目使用了多个使用 application.yml 的环境。所以有一些类似的文件,如 application-dev.yml 等。
而且没有具体的错误,我不知道这个错误到底是什么。如果你知道一些事情,请帮助我。谢谢
你可以在这里查看我的 build.gradle
我在春季项目中工作,我刚从我的 PM 那里得到项目,当项目尝试运行时出现此错误
Main class name has not been configured and it could not be resolved
该项目使用了多个使用 application.yml 的环境。所以有一些类似的文件,如 application-dev.yml 等。
而且没有具体的错误,我不知道这个错误到底是什么。如果你知道一些事情,请帮助我。谢谢
你可以在这里查看我的 build.gradle
尝试添加 mainClassName
mainClassName 应该是完全限定的类名,而不是路径。
mainClassName = "full.package.name.MainClassApplication"
这个官方等级文档可能会有所帮助。
https://docs.gradle.org/current/userguide/application_plugin.html