How to configure Proguard with Spring MVC

Hi everyone,
I spent my day finding a way to obfuscate my Spring web application, but now I’m not sure it possible.
The application uses annotations to define beans, to autowire components and to proxy dB transactions.

I faced a lot of troubles, first of all the autowirings with annotations, I tried to “keep” these classes.

The second problem was that some Bean initialization failed due to wrong class casting. It looks like it was it was the attribute signature missing.

The third problem was some service beans overloads using @Profiles, it looks like Spring cannot find its beans.

The fourth was an issue with queryparams, without param names it was not detectable. I solved keeping the param names.

The fifth issue was related to objectmapper of fasterxml, all the annotations of mapped object didn’t work, I had some customized deserializers and for unknown reason I had to “keep” these classes too otherwise the mapping failed.

At the end of the day I could run the application but the obfuscate files were very very a few. I literally excluded almost all spring files.
I think I’m missing something otherwise it means it is not possible to obfuscate a spring app.

Can you please suggest how to approach this problem?