feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3627
Open
EvanYao826 wants to merge 2 commits into
Open
feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3627EvanYao826 wants to merge 2 commits into
EvanYao826 wants to merge 2 commits into
Conversation
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
Moved sentinel-web-servlet-jakarta into a jdk17-plus profile so CI on JDK 8 and 11 no longer fails. Set compiler source/target to 17 for the Jakarta module since Spring Boot 3.x requires JDK 17+.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2998
Replaces #3618 (rebased onto latest
1.8to resolve merge conflicts).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.
Changes
New module: sentinel-adapter/sentinel-web-servlet-jakarta
Modified: sentinel-adapter/pom.xml
skip.spring.v6x.testproperty to skip tests on JDK < 17Compatibility