Currently in our application we have multiple main classes and executing them individually using below commands separately.
java -Xmx1024M -cp /path/to/jar/MyApp.jar com.....MyAppMain1
java -Xmx1024M -cp /path/to/jar/MyApp.jar com.....MyAppMain2
java -Xmx1024M -cp /path/to/jar/MyApp.jar com.....MyAppMain3
Now trying to use spring boot. What do we do to achieve the same?
In pom.xml have
…….
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
</parent>
……..
using spring boot and executing the command
java -Xmx1024M -cp /path/to/jar/MyApp.jar com.....MyAppMain1
getting error as [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project MyApp:The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java are missing or invalid
mvn clean install? looks like error the packing, please try it and let us know.; - Jonathan JOhx