Eclipse/STS – this compilation unit is not on the build path of a java project
Problem with this error message in Eclipse or SpringSource STS?
This compilation unit is not on the build path of a java project
Solution:
Run this command in the root of your project folder.
mvn eclipse:eclipse eclipse:clean
Re-import your project and everything should be working as before. Read more here.