public class My1JsonPropertySourceLoader implements org.springframework.boot.env.PropertySourceLoader {
@Override
public String[] getFileExtensions() {
return new String[]{"json"};
}
@Override
public List<PropertySource<?>> load(String name, Resource resource) throws IOException {
return null;
}
}
public class My2JsonPropertySourceLoader implements org.springframework.boot.env.PropertySourceLoader {
@Override
public String[] getFileExtensions() {
return new String[]{"json"};
}
@Override
public List<PropertySource<?>> load(String name, Resource resource) throws IOException {
return null;
}
}
Q: 按加载顺序?就看哪个类先被 classLoader 先加载?