NOTE: This repository is not to be developed on. Create another repository and use this as a template.
- Create a repository under the Aline Financial organization.
- Select
Aline-Financial/aline-microservice-template
as the repository template. - Clone your repository onto your machine.
- In the projects root, run
git submodule init
. Acore/
directory should now be created. - Run
git submodule update
to pull down the most recent core. (Note: This will clone the Core Repository that is automatically checked out to a hashed branch.) - Rename main module to be your microservice. (ex. usermicroservice)
- Update CI/CD files to match project.
- Run
mvn test
to make sure your project builds!
If you get a success, you're all set. Start creating your microservice.
The core is a shared-code repository that contains classes such as:
- Models
- Data-Transfer Objects (DTO)
- Repositories
- Custom Exceptions
- Etc...
Before you put code in the core, make sure to consider the following:
- "Is there already code in the core that already solves my problem?"
- "Will there be circular dependency between the core and the application module?"
- "Will other microservices need to use this code?"
Carefully consider these questions.
Create a new branch in the core that matches the current feature branch you are working on in the main module.
When pushing up, make sure to run git status
to make sure core changes do not need to be committed.
PUSH THE CORE FIRST
Once the core change are pushed into the repository, push your whole repository from the parent. The core branch will update.
- Maven
- SonarQube
- JaCoCo
- Jenkins (Jenkinsfile)
- Docker (Dockerfile)
- CloudFormation Template (ecs-aws.yaml)
- Swagger 2
- Swagger-UI (Access it by going to
http://localhost:{port}/swagger-ui/
)
For more information on tools & plugins included in this project, look at your repo's pom.xml
.