Setting up a project
Setting up a project using the asrr-kotlin-sb template
At ASRR we created a template for writing spring-boot based applications. This template contains the correct dependencies and setup to ensure enterprise grade API's.
Some of the features are:
- Automated openapi spec compatible with our front-end type generation
- References to ASRR Core package with generics for our CRUD controllers, service classes and repositories
- Unit test examples
- Code coverage
- Copyright / spotless
Starting from the template
- Go to https://github.com/ASRRtechnologies/asrr-kotlin-sb-template (opens in a new tab) and press the green button 'use this template'
- Create your repository with the correct name and description. We use the naming strategy
<client>-<project-name>-apifor our back-end projects. - Clone your repository to your local machine
- Open the project in IntelliJ
- Change the name of the project in the
settings.gradle.ktsfile - Change the name of the project in the
build.gradle.ktsfile - Set the correct properties in the
application.ymlfile - Try to run the application by pressing the play button in IntelliJ, the play button in your main.kt or by running
./gradlew bootRunfrom your intellij sidebar - If the application runs, you are good to go! Go to http://localhost:8080/api/v1/api-docs (opens in a new tab) to see if the application is running
Prerequisites to working on a project
- Always start from a ticket in JIRA (https://asrrtechnologies.atlassian.net/jira/software/projects (opens in a new tab))
- Select your ticket and create a branch from it. The branch name should be the ticket number and a short description of the ticket. You can also use the development button in JIRA to create a branch from the ticket.
- When you are done with your work, create a pull request to merge your branch into the development branch. The pull request should be named the same as the ticket.
- When the pull request is approved, merge it into the development branch.