micronaut-projects / micronaut-spring

A collection of utilities for Spring users of Micronaut
Apache License 2.0
159 stars 46 forks source link

Add mapping spring RequestPart annotation to micronaut Part annotation #525

Closed altro3 closed 4 months ago

altro3 commented 5 months ago

Fixed #376

altro3 commented 5 months ago

@graemerocher Don't know how to write correct mapper for org.springframework.web.multipart.MultipartFile argument. for full support @RequestPart annotation. Could anyone help?

graemerocher commented 5 months ago

using org.springframework.web.multipart.MultipartFile would require a custom request argument binder probably

altro3 commented 5 months ago

@graemerocher Yeah, I understand, that a custom mapper (bender) is needed, but I do not understand how to write such a bender correctly, because I did not find such mappers for example, so I ask for help.

Once again, I want to draw your attention to the importance of this library. In my opinion, it comes in second place in importance after the core. I don't understand why you stopped developing it. If Microsoft could be used with spring, in my opinion, it would increase the popularity of the micronaut several times.

graemerocher commented 5 months ago

because ultimately it is just a compatibility layer but full compatibility is not really achievable

altro3 commented 5 months ago

I agree, but now even basic compatibility doesn't work

graemerocher commented 5 months ago

What doesn't work specifically?

altro3 commented 5 months ago

look to this: https://github.com/micronaut-projects/micronaut-spring/issues/521

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

altro3 commented 4 months ago

@graemerocher I looked at everything again. It is quite difficult to make the correct mapping for the MultipartFile interface because its standard implementation is hidden and has private access.

So, I think that the basic mapping (which I did in this PR) is quite enough. We can merge it

graemerocher commented 4 months ago

Thanks for the contribution!