Common practices:
- Separate microservices as separate project in intellij-idea, not separate module
- Separate repository for each microservice projects
You need this degree isolation in project level because you will need to create CI/CD pipeline for each microservices which is another characteristics of microservice architecture. If these services are combined into one fat project, it would be hard to provide different version of library dependencies for different microservices (even these services are separated by Docker container when deployed). Each team who are working on different microservices should not be worried about project dependencies of another microservice. Though each microservice is part of a large, composite application, from a developer standpoint, it is important to treat each service as an independent unit of code. This makes it possible to deploy newer versions of services without disrupting the application. CI/CD pipelines should be designed to take advantage of the independent versioning.
There are too many reasons and beyond scope of discussing in one answer why you need to have different projects per microservice, but for now, go for different project and you will discover once you are into microservices realm.