mapstruct / mapstruct.org

Web site of the MapStruct project
64 stars 40 forks source link

Quarkus and MapStruct blog entry #100

Closed chris922 closed 4 years ago

chris922 commented 4 years ago

I finally updated the blog entry (+ example, see PR mapstruct/mapstruct-examples#74) to Quarkus 1.0.1.Final.

Please have a look and feel free to make some changes or give some feedback what I should change :)

Before it will be published the date (filename + fileheader) should be adjusted as well.

gsmet commented 4 years ago

Jumping in, we have quite a lot of questions about lazy initialization errors with Hibernate for which the answer is using something similar to MapStruct.

Would it be possible to write a Quarkus guide and quickstart for it? I can guide you through the process if you're inclined to do it.

chris922 commented 4 years ago

Thanks for your feedback @filiphr and @gunnarmorling . I really appreciate it! :smiley: Is it now fine for you two?

I set the date to tomorrow, so when we merge it it will be visible earliest tomorrow :smile:

@gsmet if you provide us a few more information what actually is the issue we can take a look at it. Sounds interesting as well :)

gunnarmorling commented 4 years ago

Is it now fine for you two?

I'm sure it's good :)

I set the date to tomorrow, so when we merge it it will be visible earliest tomorrow

Anything speaking against publishing it today? Getting it out on Wednesday leaves you with two days of runway (i.e. more viewers) before the weekend slowness kicks in.

gsmet commented 4 years ago

Well, it's not an issue per se. It's just that people are returning directly serializing their entities as JSON and this is done outside of the transaction layer so they get a lazy initialization exception.

This is a known issue and one of the (elegant) solution is to use MapStruct-like components. Having a small guide + quickstart on the quarkus.io website would help.

For an example of a guide + quickstart:

It probably would be a bit simpler but you get the idea.

I would be happy to assist or answer any questions.

gunnarmorling commented 4 years ago

👍 Having a MapStruct guide on quarkus.io is a great idea! It'd also raise awareness of MapStruct in the Quarkus context -- due to its nature of avoiding reflection it's the natural choice of a mapper for Quarkus, as you nicely point out in this post.

Note the Kafka Streams guide is one of the longer ones, the MapStruct one could be quite concise. What would be nice is to have this issue with the dev reload being fixed only to enable the recommended usage of MapStruct on the annotationProcessorPath.

filiphr commented 4 years ago

Oh and I am also 👍 for having a quick-start with MapStruct and Quarkus. @chris922 would you like to drive that as well?

chris922 commented 4 years ago

Thanks @gsmet! I could have a look at the quick start at the weekend, would really be a great opportunity for mapstruct to make it more visible!

@gunnarmorling and @filiphr: I was not at home the whole evening, I will try to release it tomorrow :) I really appreciate all your feedback guys! Publishing it was just starting the shell script? I already did it once in the past and as far as I remember it was really simple.

filiphr commented 4 years ago

Publishing it was just starting the shell script? I already did it once in the past and as far as I remember it was really simple.

Yes it is really simple. Detailed instructions are here on our website. and the script is this. Keep in mind you need to have hugo v0.30.2 (need to fix this, I know 😄)

gunnarmorling commented 4 years ago

@chris922, are you planning to publish this today? If so, let me know once it's done and I can tweet from the MapStruct handle.

gunnarmorling commented 4 years ago

In terms of a quickstart -- or more generically, a proper Quarkus extension -- I've logged https://github.com/quarkusio/quarkus/issues/5956 over in the Quarkus project. Any help would be highly welcomed :)

chris922 commented 4 years ago

Yesterday we had a full-day team event and I was not able to find some free minutes.. but now I finally found them and published the post. Thanks again for your support :) -> https://twitter.com/cbandowski/status/1202959353675952133 & https://mapstruct.org/news/2019-12-06-mapstruct-and-quarkus/