public CenterConfigs load()

in shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/repository/impl/YamlCenterConfigsRepositoryImpl.java [48:60]


    public CenterConfigs load() {
        if (!file.exists()) {
            return new CenterConfigs();
        }
        
        try (FileInputStream fileInputStream = new FileInputStream(file);
             InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, StandardCharsets.UTF_8)) {
            return new Yaml(new Constructor(CenterConfigs.class)).loadAs(inputStreamReader, CenterConfigs.class);
        } catch (IOException e) {
            throw new ShardingSphereUIException(ShardingSphereUIException.SERVER_ERROR, "load center config error");
        }
        
    }