-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spring 6 Spring Boot 3.x Support With Additional Spring 5 Backwards C…
…ompatibility (#1467) * Migrate to Spring 6 / Spring Boot 3 * Set JDK version to 17 in build.yaml * Try version 3 of GitHub Actions * Add required 'distribution' parameter * Remove compilation warnings * Use -Opt-in rather than deprecated -XOpt-in * Use Optional.ofNullable instead of if * Replace deprecated rawStatusCode() * Adapt new way to import AutoConfiguration * prepare to have a spring 5 backwards compatible version; Filter registration not working atm * removed unnecessary dependency * added deprecation suppression due to deprecated rawStatusCode method in spring6 * distinguish between javax and jakarta servlet filter registration * fixed ConditionalOnClass annotation for javax config * Make IntelliJ understand shaded artifact location * fix build-maven-helper-plugin execution * fixed filter bean name, added test for javax filter registration * combining compile and test step due to shaded dependency dependency in the autoconfigure module * splitting compile & test step into to separate ones * bump spring and spring boot versions * using project.build variable, added version to buil-helper-maven-plugin * removed debug output in JavaxFilterTest * removed unnecessary import * added spring 5 support documentation * using project.build.finalName instead of build.finalName * extended docs, used Java 8 for compiler settings, removed unnecessary FIX-ME --------- Co-authored-by: Sadeq Dousti <[email protected]> Co-authored-by: Sadeq <[email protected]>
- Loading branch information
1 parent
938bec5
commit 07cb014
Showing
43 changed files
with
332 additions
and
199 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,11 @@ | |
<connection>scm:git:[email protected]:zalando/logbook.git</connection> | ||
<developerConnection>scm:git:[email protected]:zalando/logbook.git</developerConnection> | ||
</scm> | ||
|
||
<properties> | ||
<shadedClassifierName>javax</shadedClassifierName> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.zalando</groupId> | ||
|
@@ -24,8 +29,8 @@ | |
<artifactId>logbook-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<groupId>jakarta.servlet</groupId> | ||
<artifactId>jakarta.servlet-api</artifactId> | ||
</dependency> | ||
<!-- testing --> | ||
<dependency> | ||
|
@@ -109,4 +114,64 @@ | |
<artifactId>json-path-assert</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>jakarta</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<shadedArtifactAttached>true</shadedArtifactAttached> | ||
<shadedClassifierName>${shadedClassifierName}</shadedClassifierName> | ||
<artifactSet> | ||
<includes> | ||
<include>${project.groupId}:${project.artifactId}</include> | ||
</includes> | ||
</artifactSet> | ||
<relocations> | ||
<relocation> | ||
<pattern>jakarta.servlet</pattern> | ||
<shadedPattern>javax.servlet</shadedPattern> | ||
</relocation> | ||
<relocation> | ||
<pattern>org.zalando.logbook.servlet</pattern> | ||
<shadedPattern>org.zalando.logbook.servlet.javax</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Make IntelliJ understand the shaded artifact location --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>3.3.0</version> | ||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>${project.build.directory}/${project.build.finalName}-${shadedClassifierName}.jar</file> | ||
<classifier>${shadedClassifierName}</classifier> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
3 changes: 2 additions & 1 deletion
3
logbook-servlet/src/main/java/org/zalando/logbook/servlet/AsyncOnCompleteListener.java
This file contains 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
17 changes: 9 additions & 8 deletions
17
logbook-servlet/src/main/java/org/zalando/logbook/servlet/HttpFilter.java
This file contains 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
10 changes: 5 additions & 5 deletions
10
logbook-servlet/src/main/java/org/zalando/logbook/servlet/LocalResponse.java
This file contains 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
5 changes: 3 additions & 2 deletions
5
logbook-servlet/src/main/java/org/zalando/logbook/servlet/LogbookAsyncListener.java
This file contains 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
This file contains 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
This file contains 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
8 changes: 4 additions & 4 deletions
8
logbook-servlet/src/main/java/org/zalando/logbook/servlet/SecureLogbookFilter.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
logbook-servlet/src/main/java/org/zalando/logbook/servlet/ServletInputStreamAdapter.java
This file contains 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
Oops, something went wrong.