Commit f572a76
authored
Fix include_http_headers on Spring Boot 3.x/Jakarta, unify Tomcat/Jetty servlet plugins (#13938) (#812)
* Fix include_http_headers on Spring Boot 3.x/Jakarta, unify Tomcat/Jetty servlet plugins (#13938)
Add a shared servlet-commons module: a JDK-typed, namespace-agnostic servlet
request/response wrapper that resolves javax.servlet vs jakarta.servlet at
runtime through a single dispatch point. Refactor the Spring MVC commons onto
it, removing the fragile static javax/jakarta detection that silently dropped
plugin.http.include_http_headers on Jakarta (Spring Boot 3.x) applications.
Merge the duplicated servlet plugin pairs, each now covering both namespaces:
- tomcat-7.x-8.x + tomcat-10x -> tomcat
- jetty-server-9.x + jetty-server-11.x -> jetty-server
Breaking change: the plugin definition names change accordingly; update any
plugin.exclude_plugins (SW_EXCLUDE_PLUGINS) settings referencing the old names.
Add E2E scenarios spring-boot-3.x (Boot 3 embedded Tomcat 10, jakarta) and
spring-boot-2.x (Boot 2, javax mirror), both asserting http.headers and
http.params; port the tomcat/jetty interceptor unit tests to the merged
modules; bump jakarta framework versions (one per minor); update docs.
* Add servlet-commons provided dependency to mvc-annotation-4.x-plugin
Its interceptor unit tests exercise the commons AbstractMethodInterceptor, which
now references servlet-commons' HttpRequestWrappers. Since commons declares
servlet-commons at provided (non-transitive) scope, it was absent from the 4.x
plugin's test classpath, causing NoClassDefFoundError in CI.1 parent a9b0cf4 commit f572a76
99 files changed
Lines changed: 2925 additions & 1237 deletions
File tree
- .github/workflows
- apm-sniffer/apm-sdk-plugin
- jetty-plugin
- jetty-server-11.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v11/server
- define
- jetty-server-9.x-plugin
- src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server
- define
- jetty-server-plugin
- src
- main
- java/org/apache/skywalking/apm/plugin/jetty/server
- define
- resources
- test/java/org/apache/skywalking/apm/plugin/jetty/server
- servlet-commons
- src
- main/java/org/apache/skywalking/apm/plugin/servlet
- test/java/org/apache/skywalking/apm/plugin/servlet
- spring-plugins
- mvc-annotation-4.x-plugin
- mvc-annotation-commons
- src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons
- interceptor
- tomcat-10x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat10x
- define
- tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x
- tomcat-plugin
- src
- main
- java/org/apache/skywalking/apm/plugin/tomcat
- define
- resources
- test
- java/org/apache/skywalking/apm/plugin/tomcat
- resources/mockito-extensions
- docs/en/setup/service-agent/java-agent
- test/plugin/scenarios
- jersey-3.x-scenario
- jetty-11.x-scenario
- resteasy-6.x-scenario
- resttemplate-6.x-scenario/bin
- spring-6.x-scenario
- config
- spring-boot-2.x-scenario
- bin
- config
- src/main
- assembly
- java/test/apache/skywalking/apm/testcase
- entity
- implinterface
- inherit
- restapi
- resttemplate
- spring3
- component
- dao
- service
- resources
- spring-boot-3.x-scenario
- bin
- config
- src/main
- assembly
- java/test/apache/skywalking/apm/testcase
- entity
- implinterface
- inherit
- restapi
- resttemplate
- spring3
- component
- dao
- service
- resources
- undertow-2.3.x-scenario
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
Lines changed: 0 additions & 63 deletions
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 0 additions & 90 deletions
This file was deleted.
This file was deleted.
0 commit comments