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

router plugins support springboot3 #1670

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

provenceee
Copy link
Collaborator

@provenceee provenceee commented Nov 14, 2024

What type of PR is this?

Feature

What this PR does / why we need it?

router plugin does not support springboot3

Which issue(s) this PR fixes?

Fixes #1669

Does this PR introduce a user-facing change?

should update support version

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

Signed-off-by: provenceee <83857838+provenceee@users.noreply.github.com>
Signed-off-by: provenceee <83857838+provenceee@users.noreply.github.com>
@provenceee provenceee added kind/enhancement Issues or PRs releated to sermant enhancement area/plugin Issues or PRs releated to sermant plugin service labels Nov 14, 2024
@provenceee provenceee self-assigned this Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 75.34247% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...mant/flowcontrol/DispatcherServletInterceptor.java 69.56% 7 Missing ⚠️
...ace/interceptors/DispatcherServletInterceptor.java 76.19% 4 Missing and 1 partial ⚠️
...itor/interceptor/DispatcherServletInterceptor.java 0.00% 3 Missing ⚠️
...try/grace/declarers/DispatcherServletDeclarer.java 0.00% 3 Missing ⚠️
Flag Coverage Δ Complexity Δ
unittests 43.97% <75.34%> (+0.01%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...ter/spring/declarer/DispatcherServletDeclarer.java 0.00% <ø> (ø) 0.00 <0.00> (?)
...pring/interceptor/DiscoveryManagerInterceptor.java 87.50% <100.00%> (-6.25%) 0.00 <0.00> (ø)
...ring/interceptor/DispatcherServletInterceptor.java 92.10% <100.00%> (ø) 0.00 <0.00> (?)
...pring/interceptor/EurekaHttpClientInterceptor.java 91.66% <100.00%> (ø) 0.00 <0.00> (ø)
...spring/interceptor/ServiceRegistryInterceptor.java 84.21% <100.00%> (ø) 0.00 <0.00> (ø)
...sermant/router/spring/utils/SpringRouterUtils.java 37.50% <100.00%> (+11.57%) 0.00 <0.00> (ø)
...try/grace/interceptors/GraceSwitchInterceptor.java 76.59% <100.00%> (+2.12%) 0.00 <0.00> (ø)
...itor/interceptor/DispatcherServletInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...try/grace/declarers/DispatcherServletDeclarer.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ace/interceptors/DispatcherServletInterceptor.java 76.31% <76.19%> (ø) 0.00 <0.00> (?)
... and 1 more

... and 1 file with indirect coverage changes

@provenceee provenceee requested review from daizhenyu, lilai23 and hanbingleixue and removed request for daizhenyu and lilai23 November 14, 2024 07:35
@provenceee
Copy link
Collaborator Author

for HttpServletRequest/HttpServletResponse, springboot1 and springboot2 package name is javax.servlet.http.HttpServletRequest/javax.servlet.http.HttpServletResponse, springboot3 package name is jakarta.servlet.http.HttpServletRequest/jakarta.servlet.http.HttpServletResponse, so use reflections to adapt these.

Comment on lines +73 to +74
private Map<String, String> getHeaders(Object request) {
final Enumeration<String> headerNames = getHeaderNames(request);
Copy link
Collaborator

Choose a reason for hiding this comment

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

use class name to distinguish low version and high version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Issues or PRs releated to sermant plugin service kind/enhancement Issues or PRs releated to sermant enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

router plugin supports springboot3
2 participants