-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the extension
MapStruct is a compile-time code generator (JSR 269 annotation processor) for bean-to-bean-mappings, useful e.g. to map an internal (entity) model to the external (REST) model of an application. As the generated code avoids any kind of reflection, MapStruct leans itself to being a perfect match with Quarkus and GraalVM.
Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).
Configuration suggestion
MapStruct has a few annotation processor options that impact the generated source code (e.g. whether to include or not a timestamp). I suppose they might be made static Quarkus properties, but not sure whether that's needed really. To clarify, these options are not examined by the generated code, but they impact how the code is generated.
Additional context
MapStruct works with Quarkus/GraalVM out-of-the-box. So the value of the extension would be better a getting started experience by means of selecting it from the catalogue. One thing it actually could do is to enable all generated mappers for reflection. That's not needed when using CDI as the component model for the generated code (which is what I'd recommend with Quarkus), but there's an alternative way to obtain mapper instances which uses reflection (Mappers.getInstance(MyMapper.class)). This is the only location where reflection is used so it'd benefit from automatic enabling this.