
Micronaut
=========


Status
------

2026-02-08: Draft
2026-02-08: Accepted
2026-02-10: Reviewed
2026-04-29: Reviewed
2026-09-14: Reviewed



Context
-------

While it's possible to develop on either low level HTTP servers on Netty, or on application servers like Apache Jetty or Apache Tomcat, using some framework gives some productivity from the abstractions they provide.



Considerations
--------------

The following frameworks were considered:

- Micronaut
- Quarkus
- Helidon
- Javalin
- Spring



Decision
--------

Micronaut was chosen.



Justification
-------------

Quarkus can be used with RESTEasy, which implements JAX-RS. It also implements a Jakarta CDI Lite specification. It was discaded due to all the *magic* it provides. The main entrypoint is generated by the framework, for example. 

Helidon and Javalin both have a programmatic interface for declaring controllers. Thus, organizing it usually requires using a *composition root* pattern. Helidon dependency injection depends on it's edition: Micro Profile uses Jakarta CDI, and Standard Edition uses Helidon Inject. 

Spring declare controllers using annotations, has it's own annotations, but implements JSR-330. However, it provides high coupling with the framework and works on annotation *magic*.

Micronaut is lightweight, fully implements JSR-330, and controllers are declared using annotations. It's also possible to be packaged as Native Image.


### Dependency Injection for Java (JSR-330) vs Jakarta CDI

JSR-330 defines the annotations that can be used by some DI implementation.

Jakarta CDI in a DI implementation which specifies implementation behavior.



Observations
------------

An issue with Micronaut is it's documentation. Even though it has some, the documentation relies heavily on the default build using `mn` script or it's web launch. When fine-tuning Micronaut's dependencies, a developer can face undocumented issues when creating some structures, which may take some time to diagnose and fix.

### update 2026-04-29

Some Micronaut patterns:

- declarative controllers/endpoints: makes the *composition root* pattern unnecessary, since it uses component scanning.





