Skip to content

3.0.0-M1 Removals #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
Tracked by #157 ...
fabapp2 opened this issue Jun 13, 2022 · 6 comments · Fixed by #324
Closed
2 tasks done
Tracked by #157 ...

3.0.0-M1 Removals #162

fabapp2 opened this issue Jun 13, 2022 · 6 comments · Fixed by #324
Assignees
Labels
3.0.0 Spring Boot 3.0.0 good first issue Good for newcomers

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Jun 13, 2022

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

  • How to find out if SecurityManager is used?
  • How to find out if CommonsMultipartResolver is used?

SecurityManager

Finder

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

Implementation
  • Implement the Finder as OpenRewriteRecipe adding Markers to the matching locations
  • Let the `Sbm30_Finder´ implementation use the finder recipe

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
  • Create a new OpenRewrite Finder recipe that finds/marks Spring bean declarations by type (potential contribution)
  • Let the `Sbm30_Finder´ implementation use the finder recipe
  • Create a ProjectResourceFinder delegating to the recipe to find Spring bean declarations by type using the ProjectContext

Recipe

Remove beans of type CommonsMultipartResolver

Implementation
  • Create OpenRewrite recipe RemoveCommonsMultipartResolverBeanDeclarations that uses the finder and removes bean declaration methods (potential contribution)
  • Link the recipe as named recipe in the upgrade recipe yaml

Report

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

@fabapp2 fabapp2 added 3.0.0 Spring Boot 3.0.0 Boot/Upgrade labels Jun 13, 2022
@fabapp2 fabapp2 added this to the Spring Boot Upgrade 3.0 (M3) milestone Jun 13, 2022
@fabapp2 fabapp2 changed the title Spring Boot Upgrade 3.0.0-M1 Removals 3.0.0-M1 Removals Jun 13, 2022
@sanagaraj-pivotal
Copy link
Contributor

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

@BoykoAlex
Copy link
Collaborator

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
Copy link
Contributor Author

fabapp2 commented Aug 1, 2022

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
Copy link
Contributor Author

fabapp2 commented Aug 1, 2022

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

@sanagaraj-pivotal where to find it?

@fabapp2 fabapp2 added good first issue Good for newcomers and removed question labels Aug 3, 2022
@fabapp2
Copy link
Contributor Author

fabapp2 commented Aug 4, 2022

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

@fabapp2 fabapp2 self-assigned this Aug 11, 2022
fabapp2 added a commit that referenced this issue Aug 15, 2022
- Add common SpringBeanMethodDeclarationFinder
@fabapp2 fabapp2 linked a pull request Aug 15, 2022 that will close this issue
fabapp2 added a commit that referenced this issue Aug 15, 2022
- Add common SpringBeanMethodDeclarationFinder
fabapp2 added a commit that referenced this issue Aug 15, 2022
- Add common SpringBeanMethodDeclarationFinder
fabapp2 added a commit that referenced this issue Aug 15, 2022
- Add common SpringBeanMethodDeclarationFinder
fabapp2 added a commit that referenced this issue Aug 15, 2022
- Add common SpringBeanMethodDeclarationFinder
@john17797
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0 Spring Boot 3.0.0 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants