Spring Gradle Project

81 views Asked by At

I working in spring project, I just got the project from my PM and when the project try to run got this error

Main class name has not been configured and it could not be resolved

The project is using more than one environment that using application.yml. So there'are some file similar like application-dev.yml etc.

And there's no specific error, I had no idea what the fu*k is this error. Please help me if you know something about. thanks

You can check my build.gradle here

https://pastebin.com/3dwJAgNp

1

There are 1 answers

0
George On BEST ANSWER

Try adding mainClassName

mainClassName should be fully qualified class name, not path.

mainClassName = "full.package.name.MainClassApplication"

This official grade docs can be helpful .

https://docs.gradle.org/current/userguide/application_plugin.html