I am using Eclipse and have not used Java for sometime. However, I can compile my code on the command-line just fine and generate the necessary .class files. In
.class
I was using Spring Tool Suite 4. Not able to figure out the issue. The directory structure was according to the package name.
But cleaning the project helped me.