spring-projects-experimental / spring-boot-migrator

Spring Boot Migrator (SBM) is a tool for automated code migrations to upgrade or migrate to Spring Boot
Apache License 2.0
444 stars 88 forks source link

3.0.0-M1 Removals #162

Closed fabapp2 closed 2 years ago

fabapp2 commented 2 years ago

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M1-Release-Notes#miscellaneous

Apart from the changes listed above, there have also been some minor tweaks and improvements including:

  • Support for Java’s SecurityManager has been removed following its deprecation in the JDK
  • Support for Spring Framework’s CommonsMultipartResolver has been removed following its removal in Spring Framework 6

What needs to be done

SecurityManager

Finder

Find System.getSecurityManager() or AccessControlException (potential contribution)

Implementation

Recipe

None

Report

Inform the user about the potential usage of SecurityManager and that this class was removed.

CommonsMultipartResolver

Finder

Find bean definitions of type CommonsMultipartResolver

Implementation

Recipe

Remove beans of type CommonsMultipartResolver

Implementation

Report

Suggest to remove CommonsMultipartResolver bean and relying on Spring Boot auto-configuration

sanagaraj-pivotal commented 2 years ago

CommonsMultipartResolver Deprecation part is not done, possible partial implementation for SecurityManager Deprecation

BoykoAlex commented 2 years ago

Anyone knows what is recommended to use instead of CommonsMultipartResolver? Other than having a TODO comment over the corresponding bean definition i have no idea what to do...

fabapp2 commented 2 years ago

Hi @BoykoAlex, the API states

The common alternative is StandardServletMultipartResolver, delegating to the Servlet container's own multipart parser, with configuration to happen at the container level and potentially with container-specific limitations.

Not sure what this means for the recipe though.

fabapp2 commented 2 years ago

CommonsMultipartResolver Deprecation part is not done, possible partial implementation for SecurityManager Deprecation

@sanagaraj-pivotal where to find it?

fabapp2 commented 2 years ago

@BoykoAlex I clarified with the team, see my updated description.

john17797 commented 8 months ago

Can anyone tell me about the alternative solution for CommonsMultipartResolver? I have this bean in my project, and I need to replace after I upgraded the spring-web dependency.