Skip to content
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

Toggle serialization mode to json for compatibility with spring-security version updates #4484

Merged
merged 51 commits into from
Aug 2, 2022

Conversation

klboke
Copy link
Contributor

@klboke klboke commented Jul 26, 2022

What's the purpose of this PR

Switching spring-session serialization mode to json for compatibility with spring-security version updates

When the current version upgrades spring-boot, it may also upgrade spring-security, which will trigger a version compatibility issue with spring-security, throwing the following exception:

2022-07-25 19:49:53.256 ERROR 1 --- [io-8070-exec-14] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] threw exception

org.springframework.core.convert.ConversionFailedException: Failed to convert from type [byte[]] to type [java.lang.Object] for value '{110, 103, 44, 100, 99, 61, 99, 111, 109, 112, 116, 0, 11, 99, 104, 101, 110, 107, 97, 105, 108, 105, 110, 103}'; 
nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 540, local class serialVersionUID = 560

UI error reporting:
image

klboke and others added 30 commits May 16, 2019 11:07
@klboke klboke requested review from vdiskg and nobodyiam July 26, 2022 10:27
@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2022

Codecov Report

Merging #4484 (091a757) into master (1458a93) will decrease coverage by 0.04%.
The diff coverage is 16.66%.

@@             Coverage Diff              @@
##             master    #4484      +/-   ##
============================================
- Coverage     53.52%   53.48%   -0.05%     
- Complexity     2702     2704       +2     
============================================
  Files           489      490       +1     
  Lines         15325    15343      +18     
  Branches       1596     1596              
============================================
+ Hits           8203     8206       +3     
- Misses         6565     6580      +15     
  Partials        557      557              
Impacted Files Coverage Δ
...o/portal/component/config/SpringSessionConfig.java 16.66% <16.66%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klboke klboke merged commit 17f5961 into apolloconfig:master Aug 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2022
@nobodyiam nobodyiam added this to the 2.1.0 milestone Feb 5, 2023
@klboke klboke deleted the spring-session branch March 21, 2023 03:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants