S3Mock is incompatible with Spring Boot 3.2.x and Spring Framework 6.x #1555
Labels
dependency-problem
S3Mock Java API is used and S3Mock dependencies clash with users application dependencies.
The way parameter names are detected (for annotations such as @PathVariable) changed in Spring Boot 3.2.0 and Spring Framework 6.x (see Parameter Name Discovery in the Spring Boot 3.2 Release Notes).
Unfortunately, this causes the latest version of S3Mock to be incompatible with Spring Boot 3.2.x and Spring Framework 6.x. Attempting to use S3Mock with Spring Boot 3.2.x results in errors similar to:
Thankfully, this is very easy to fix. The Java compiler needs to be configured to use the
-parameters
flag, which causes the compiler to include the necessary metadata Spring needs to detect the parameter names.Using Maven, this can be done by adding
<parameters>true</parameters>
to the configuration section of the maven-compiler-plugin. See Parameter Name Retention in Upgrading to Spring Framework 6.x for a more complete example.I have done this with a local checkout of S3Mock, and I have confirmed it works.
The text was updated successfully, but these errors were encountered: