Type: Bug
Component:
S3
Describe the bug
Using Spring Cloud AWS 3.4.2 when updating from Spring Framework 6.2.18 to 6.2.19 the following no longer works for io.awspring.cloud.s3.S3Resource
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("path/**")
.addResourceLocations("s3://bucket/path/")
)
As Spring Framework enforces a slash on end ( spring-projects/spring-framework@fb0c78a )
resolveResourceLocations() was patched to call assertResourceLocation() for every resolved resource — so string-based locations get the same validation. s3:// location encounters problem: Spring Cloud AWS's Location.resolveObjectName() strips the trailing slash ("path/" → "path"), so S3Resource.getURL() builds a path-style URL https://s3.amazonaws.com/path without a trailing slash, and url.getPath() fails the assertion.
Type: Bug
Component:
S3
Describe the bug
Using Spring Cloud AWS 3.4.2 when updating from Spring Framework 6.2.18 to 6.2.19 the following no longer works for io.awspring.cloud.s3.S3Resource
As Spring Framework enforces a slash on end ( spring-projects/spring-framework@fb0c78a )
resolveResourceLocations()was patched to callassertResourceLocation()for every resolved resource — so string-based locations get the same validation. s3:// location encounters problem: Spring Cloud AWS'sLocation.resolveObjectName()strips the trailing slash ("path/" → "path"), soS3Resource.getURL()builds a path-style URL https://s3.amazonaws.com/path without a trailing slash, andurl.getPath()fails the assertion.