How to combine ConversionServiceAdapter with BeanUpdate? #3923
Replies: 2 comments
-
|
As far as I understand the Spring
What is the problem in autowiring the mapper interface? You don't need to auto wire the generated mapper, just the defined mapper. |
Beta Was this translation helpful? Give feedback.
-
|
As @filiphr has pointed out, this is not possible with the Spring extension. Spring's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using
mapstruct-spring-extensionsand it is very convenient having to autowire only the generatedConversionServiceAdapterin my services. But I did not find in the tutorial how to combine theBeanUpdatemechanism with this.Use-case: I want to have new method that would handle the mapping with ignored null fields when writing update methods for
PATCHrequests.Is it even possible to achieve this? I assume I could autowire the generated mapper directly in the service with the method but I guess that kind of defeats the purpose of using
ConversionServiceAdapterand having loose coupling. Am I missing something? Appreciate your insights and hopefully you can steer me in the right direction.Beta Was this translation helpful? Give feedback.
All reactions