Since getPath() returns a relative path if the resource was created using the ClassPathResource(String,Class) constructor, there was previously no way to consistently obtain the absolute path to the resource within the class path. This commit addresses this shortcoming by introducing a new getAbsolutePath() for consistently obtaining the absolute path to the resource within the class path. See gh-29083 Closes gh-29094