Skip to content

Commit 038c4e0

Browse files
authored
Merge pull request #2470 from adobe/fixes-4.5.0
Deprecate legacy properties, README fixes.
2 parents d21a801 + af43ff6 commit 038c4e0

File tree

27 files changed

+449
-163
lines changed

27 files changed

+449
-163
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Running S3Mock in unit tests is still supported by using [TestContainers](https:
123123
* Features and fixes
124124
* TBD
125125
* Refactorings
126+
* Removal of legacy-style Spring properties in favor of current environment variables.
126127
* AWS has deprecated SDK for Java v1, and will remove support EOY 2025.
127128
* S3Mock will remove bundled support for Java SDK v1 in late 2025.
128129
* JUnit 4.x deprecation
@@ -164,11 +165,17 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav
164165
* Refactorings
165166
* Add JSpecify annotations to S3Mock code
166167
* Migrate unit tests in "testsupport" modules to Kotlin
168+
* Deprecation of legacy-style Spring properties in favor of current environment variables.
169+
* Various fixes and clarifications in README.md
167170
* Version updates (deliverable dependencies)
168171
* Bump alpine from 3.21.3 to 3.22.0 in /docker
169-
* Bump aws.version from 1.12.783 to 1.12.785
170-
* Bump testcontainers.version from 1.21.0 to 1.21.1
172+
* Bump aws-v2.version from 2.31.50 to 2.31.67
173+
* Bump aws.version from 1.12.783 to 1.12.787
174+
* Bump spring-boot.version from 3.5.0 to 3.5.3
175+
* Bump testcontainers.version from 1.21.0 to 1.21.2
171176
* Version updates (build dependencies)
177+
* Bump aws.sdk.kotlin:s3-jvm from 1.4.91 to 1.4.109
178+
* Bump org.xmlunit:xmlunit-assertj3 from 2.10.2 to 2.10.3
172179
* Bump org.codehaus.mojo:exec-maven-plugin from 3.5.0 to 3.5.1
173180
* Bump org.apache.maven.plugins:maven-clean-plugin from 3.4.1 to 3.5.0
174181
* Bump com.puppycrawl.tools:checkstyle from 10.24.0 to 10.25.0

README.md

Lines changed: 273 additions & 100 deletions
Large diffs are not rendered by default.

build-config/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>com.adobe.testing</groupId>
2323
<artifactId>s3mock-parent</artifactId>
24-
<version>4.4.1-SNAPSHOT</version>
24+
<version>4.5.0-SNAPSHOT</version>
2525
</parent>
2626

2727
<artifactId>s3mock-build-config</artifactId>

docker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.4.1-SNAPSHOT</version>
25+
<version>4.5.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock-docker</artifactId>

integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.4.1-SNAPSHOT</version>
25+
<version>4.5.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock-integration-tests</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<groupId>com.adobe.testing</groupId>
2323
<artifactId>s3mock-parent</artifactId>
24-
<version>4.4.1-SNAPSHOT</version>
24+
<version>4.5.0-SNAPSHOT</version>
2525
<packaging>pom</packaging>
2626

2727
<name>S3Mock - Parent</name>

server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.4.1-SNAPSHOT</version>
25+
<version>4.5.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock</artifactId>

server/src/main/java/com/adobe/testing/s3mock/BucketController.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@
7676
@RequestMapping("${com.adobe.testing.s3mock.contextPath:}")
7777
public class BucketController {
7878
private final BucketService bucketService;
79-
private final Region region;
8079

81-
public BucketController(BucketService bucketService, Region region) {
80+
public BucketController(BucketService bucketService) {
8281
this.bucketService = bucketService;
83-
this.region = region;
8482
}
8583

8684
//================================================================================================
@@ -376,8 +374,9 @@ public ResponseEntity<LocationConstraint> getBucketLocation(@PathVariable String
376374

377375
/**
378376
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">API Reference</a>.
379-
* @deprecated Long since replaced by listObjectsV2
377+
*
380378
* @see #listObjectsV2
379+
* @deprecated Long since replaced by listObjectsV2
381380
*/
382381
@GetMapping(
383382
value = {
@@ -486,12 +485,12 @@ public ResponseEntity<ListVersionsResult> listObjectVersions(
486485
return ResponseEntity.ok(listVersionsResult);
487486
}
488487

488+
@Nullable
489489
private String regionFrom(@Nullable CreateBucketConfiguration createBucketRequest) {
490-
if (createBucketRequest != null
491-
&& createBucketRequest.locationConstraint() != null
492-
&& createBucketRequest.locationConstraint().region() != null) {
493-
return createBucketRequest.locationConstraint().region().toString();
490+
if (createBucketRequest != null) {
491+
return createBucketRequest.regionFrom();
492+
} else {
493+
return null;
494494
}
495-
return this.region.toString();
496495
}
497496
}

server/src/main/java/com/adobe/testing/s3mock/S3MockConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
2121

2222
import com.adobe.testing.s3mock.dto.ErrorResponse;
23-
import com.adobe.testing.s3mock.dto.Region;
2423
import com.adobe.testing.s3mock.service.BucketService;
2524
import com.adobe.testing.s3mock.service.MultipartService;
2625
import com.adobe.testing.s3mock.service.ObjectService;
@@ -159,8 +158,8 @@ ObjectController fileStoreController(ObjectService objectService, BucketService
159158
}
160159

161160
@Bean
162-
BucketController bucketController(BucketService bucketService, S3MockProperties properties) {
163-
return new BucketController(bucketService, properties.region());
161+
BucketController bucketController(BucketService bucketService) {
162+
return new BucketController(bucketService);
164163
}
165164

166165
@Bean

server/src/main/java/com/adobe/testing/s3mock/S3MockProperties.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ public record S3MockProperties(
3232
// For example if set to `s3-mock` all endpoints will be available at
3333
// `http://host:port/s3-mock` instead of `http://host:port/`
3434
@DefaultValue("")
35-
String contextPath,
36-
37-
// Region is S3Mock is supposed to mock.
38-
// Must be an official AWS region string like "us-east-1"
39-
Region region
35+
String contextPath
4036
) {
4137

4238
}

0 commit comments

Comments
 (0)