Skip to content

feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3618

Open
EvanYao826 wants to merge 1 commit into
alibaba:masterfrom
EvanYao826:feat/jakarta-servlet-adapter-2998
Open

feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3618
EvanYao826 wants to merge 1 commit into
alibaba:masterfrom
EvanYao826:feat/jakarta-servlet-adapter-2998

Conversation

@EvanYao826
Copy link
Copy Markdown

Fixes #2998

Summary

Add sentinel-web-servlet-jakarta module to support Jakarta EE Servlet 6.0 (Spring Boot 3.x, JDK 17+).

Background

Spring Boot 3.x migrated from javax.servlet to jakarta.servlet as part of the Jakarta EE 9+ transition. The existing sentinel-web-servlet module uses javax.servlet-api 3.1.0 and is incompatible with Spring Boot 3.x applications.

Previous PR #3001 attempted this but was closed without merge.

Changes

New module: sentinel-adapter/sentinel-web-servlet-jakarta

  • pom.xml: Maven configuration with jakarta.servlet-api 6.0.0 and Spring Boot 3.2.0 for tests
  • 10 Java source files from sentinel-web-servlet with javax.servlet to jakarta.servlet migration
    • CommonFilter, CommonTotalFilter, callback classes, config, utils

Modified: sentinel-adapter/pom.xml

  • Added module sentinel-web-servlet-jakarta

Usage

com.alibaba.csp sentinel-web-servlet-jakarta

Compatibility

  • Jakarta EE Servlet 6.0+
  • Spring Boot 3.x
  • JDK 17+

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 14, 2026

CLA assistant check
All committers have signed the CLA.

@EvanYao826
Copy link
Copy Markdown
Author

I have read and fully agree to the Contributor License Agreement (CLA).

@LearningGp
Copy link
Copy Markdown
Collaborator

The CLA check failed. Please ensure that your commit email matches your GitHub account email.

@EvanYao826
Copy link
Copy Markdown
Author

@CLAassistant recheck please. I have signed the CLA.

@LearningGp
Copy link
Copy Markdown
Collaborator

The tests failed on JDK 8 and 11. It is recommended to partially skip them by referencing other v6x components. For example, you can add the <skip.spring.v6x.test>false</skip.spring.v6x.test> configuration, similar to what is done in sentinel-spring-webmvc-v6x-adapter.

@EvanYao826
Copy link
Copy Markdown
Author

@LearningGp Thanks for the feedback! I see two issues:

  1. CLA check failed — The commit email is 2869018789@qq.com instead of the GitHub noreply format. I will amend the commits to use 155432245+EvanYao826@users.noreply.github.com and force-push.

  2. Tests failed on JDK 8 and 11 — I will add the skip.spring.v6x.test configuration as suggested, similar to sentinel-spring-webmvc-v6x-adapter.

Will update the PR shortly.

Add sentinel-web-servlet-jakarta module to support Jakarta EE Servlet
6.0 (Spring Boot 3.x, JDK 17+).

Changes:
- New module: sentinel-adapter/sentinel-web-servlet-jakarta
- All javax.servlet imports replaced with jakarta.servlet
- jakarta.servlet-api 6.0.0 (replacing javax.servlet-api 3.1.0)
- Spring Boot 3.2.0 for tests (replacing 1.5.17.RELEASE)
- Added new module to sentinel-adapter/pom.xml

Usage:
  <dependency>
    <groupId>com.alibaba.csp</groupId>
    <artifactId>sentinel-web-servlet-jakarta</artifactId>
  </dependency>

Fixes alibaba#2998
@EvanYao826 EvanYao826 force-pushed the feat/jakarta-servlet-adapter-2998 branch from b61ce9c to 4d21d48 Compare May 23, 2026 04:44
@EvanYao826
Copy link
Copy Markdown
Author

@LearningGp Thanks for the feedback!

  1. CLA: Already signed ✅
  2. JDK 8/11 test failure: I have identified the issue — the PR branch has an outdated CI config that doesn't include the -Dskip.spring.v6x.test=true flag for JDK < 17. I will rebase onto the latest master branch which has the updated CI configuration to fix this.

I'll push the rebased commits shortly.

@EvanYao826
Copy link
Copy Markdown
Author

@LearningGp Thanks for the review! Both issues have been addressed:

  1. CLA / Commit email — Fixed ✅ The commit author email has been updated to the GitHub noreply format (155432245+EvanYao826@users.noreply.github.com). CLA check now passes.

  2. JDK 8/11 test failure — Fixed ✅ Added <skipTests>${skip.spring.v6x.test}</skipTests> to the surefire plugin configuration in sentinel-web-servlet-jakarta/pom.xml, consistent with other v6x modules like sentinel-spring-webmvc-v6x-adapter. Tests will be skipped when CI runs with -Dskip.spring.v6x.test=true on JDK < 17.

Please let me know if there are any other concerns!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants