Skip to content

How do I tell Spring Boot which main class to use for the executable jar?

Execution default of goal 
Unable to find a single main class from the following candidates

My project has more than one class with a main method. How do I tell the Spring Boot Maven plugin which of the classes it should use as the main class?


Add your start class in your pom:

    <!-- The main class to start by executing java -jar -->