Kotlin based Spring Boot application.
- Resources
- What does it include/use?
- Dependencies included with Spring Boot Framework
- Getting Started
- Gradle 7.5.1
- Java 18
- Spring Boot 2.7.5 (Compatible with Java 17 && Kotlin)
- Spring Web package (Build web, including RESTful, applications using Spring MVC. Uses Apache Tomcat as the default embedded container.)
- Spring Boot Actuator (Supports built in (or custom) endpoints that let you monitor and manage your application - such as application health, metrics, sessions, etc.)
The base folder structure was based on Hexagonal Architecure:
Required JDK
-
- Download the latest version compatible with Kotlin.
-
At the moment the Docker development is slow, we recommend using IntelliJ IDEA for the application, and the rest of dependencies using Docker
Required Tools
- Docker
- Also available via HomeBrew,
brew install docker docker-compose && brew cask install docker
- Also available via HomeBrew,
- IntelliJ IDEA
Configure your IDE
- As stated, we use IntelliJ IDEA to spin up the application, the IDE should be smart enough to configure everything except environment variables, you need to expose these through:
- Edit configuration (BookingApplication) -> Modify Options -> Operating System -> enable Environment Variables.
Clone this repository:
git clone git@github.com:shaydaroglu/booking-api.git
Then migrate the database with setting active profile as migration as following:
--spring.profiles.active=migration
After this is done (or if not needed), run the service using your IDE, you should be able to load (http://127.0.0.1:8080/healthcheck) and be greeted with:
{
"booking-api": "is_alive"
}