• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring Boot - Two modules - Main method

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?

Thanks,
 
Saloon Keeper
Posts: 14682
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Matthew Vahedi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?



Hi,
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.

Cheers,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic