Open alexist opened 9 months ago
Hi,
You are right, it's perhaps time to inject depedencies !!
I try Micronaut DI on antoher project. It seems good for the purpose here. You can try version 3.10.3, the last compatible with Java 1.8, if you have some time to spend on this !!
Hi, Currently, there is no dependency injection, dependencies are instanciates in classes who needs them. The main drawback : writing unit test is not easy, you will need PowerMock, mock constructor call, and maybe mock static method too
Integrating a minimalist DI framework can solve this.
This article talk about Micronaut DI integration with vertx : https://taraskohut.medium.com/vert-x-micronaut-do-we-need-dependency-injection-in-the-microservices-world-84e43b3b228e