Spring Boot Program cannot find main class

Christopher Jobling picture Christopher Jobling · Feb 11, 2015 · Viewed 258.8k times · Source

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

Answer

mantri picture mantri · Sep 9, 2016

I had the same problem. Try this :

Right Click the project -> Maven -> Update Project

Then Re-run the project. Hope it work for you too.