When creating a FileSystemResource with a Path containing .. in the path, then createRelative resolves to a wrong path.
The problem resides on StringUtils::applyRelativePath method: I suggest change the method on FileSystemResource checking first if the location is a Path and then use Path::resolve instead calling StringUtils::applyRelativePath.
println(FileSystemResource(Paths.get("../xxxx/dist/")).createRelative("index.html"))
print ../index.html instead ../xxx/dist/index.html.
Attached image shows the variables inside FileSystemResource::createRelative method.

When creating a
FileSystemResourcewith aPathcontaining..in the path, thencreateRelativeresolves to a wrong path.The problem resides on
StringUtils::applyRelativePathmethod: I suggest change the method onFileSystemResourcechecking first if the location is aPathand then usePath::resolveinstead callingStringUtils::applyRelativePath.print
../index.htmlinstead../xxx/dist/index.html.Attached image shows the variables inside
FileSystemResource::createRelativemethod.