Example of how to replace default beans in Micronaut using few simple annotations.
Before running the application, please remember to set environment variable MONGODB_URI
. This will allow it to connect to provided Mongo instance. Value should follow convention: mongodb://USERNAME:PASSWORD@HOST:PORT
Used versions:
- Kotlin - 1.8.0
- Gradle - 7.6
- JDK - 19
- Micronaut - 3.8.0