fix: resource loading failure caused by incorrect parameter order in StringUtils.startsWithIgnoreCase (#5173)

This commit is contained in:
Yazid Lee
2024-06-26 15:53:24 +08:00
committed by GitHub
parent 9493ff733d
commit 9373429015
5 changed files with 5 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ import org.springframework.util.PropertyPlaceholderHelper;
public class YamlUtils {
public static <T> T resourceYmlToObj(String resource, String prefix, Class<T> clazz) {
if (!StringUtils.startsWithIgnoreCase("classpath:", resource)) {
if (!StringUtils.startsWithIgnoreCase(resource, "classpath:")) {
resource = "classpath:" + resource;
}
ClassPathResource classPathResource = new ClassPathResource(resource);