I'm trying to build a spring boot application which consists of two modules ( Persistence, Web). The persistence module only supposed to do persistence job hence I thought no need for main method/class. The Web module is where I'm implementing my restful logic and hence I considered that's where I need main method. However, when I try to compile this project using Maven, there is an error saying "unable to find a suitable main class" for the Persistence module!
My questions is, Should all modules have a main class?! if yes, then how should I add a main class to a module that is a only for persistence purpose?
Stephan van Hulst wrote:No, libraries don't need a main method.
Can you show us your POM, the command you use to compile the project, and its output?
Thanks for your guide. Unfortunately, it's a project belong to an organization and my team lead said I'm not allowed to post anything project-related to this forum Sorry about that! But thanks again pointing out the quick answer.