javaeclipsespring-mvcspring-boot

Spring Boot Program cannot find main class


I have a program which runs as a Spring boot App in eclipse. The program was running fine. Then i did the following:

Right click on project -> Run As -> Maven Test .

This was accidental. When i then tried to run the program as a spring boot app again, it threw the following error below.

Error: Could not find or load main class com.bt.collab.alu.api.webapp.Application

How do i point the application back to my main class? Thanks


Solution

  • Main class is configurable in pom.xml

    <properties>
        <start-class>com.bt.collab.alu.api.webapp.Application</start-class>
    </properties>